🍋
Menu
.yml Code

YML (YAML Alias)

YML is an alternative file extension for YAML files, functionally identical to .yaml. Both extensions are widely used, with .yml being more common in some ecosystems (Docker Compose, GitHub Actions) and .yaml preferred by the official YAML specification.

MIME Type

application/x-yaml

Type

Text

Compression

Lossless

Advantages

  • + Shorter extension, widely recognized
  • + Default in Docker Compose (docker-compose.yml)
  • + Used by GitHub Actions (.github/workflows/*.yml)

Disadvantages

  • Not the officially recommended extension (.yaml is preferred)
  • Inconsistency between .yml and .yaml can confuse tooling
  • Same indentation pitfalls as .yaml

When to Use .YML

Use .yml or .yaml consistently within a project; .yml is common for Docker Compose and GitHub Actions, while .yaml is the official extension.

Technical Details

Identical to .yaml files — same YAML specification, same parser, same features. The file extension is purely cosmetic and does not affect parsing behavior.

History

The .yml extension emerged as a shorter alternative to .yaml, following the convention of three-character extensions. Many tools accept both, and the choice is largely a matter of project convention.

Convert from .YML

Convert to .YML

Related Formats