Skip to content

What is a YAML file?

YAML holds the same information as JSON but lays it out as an indented outline, so a person can read and edit it comfortably. It also allows comments, which is why so many configuration files use it. You can convert YAML files here, both into the format and out of it.

Specification

YAML format specifications
Full nameYAML Ain't Markup Language
Extensions.yaml, .yml
Media typeapplication/yaml
CompressionUncompressed
Transparency
Animation
Multiple pages
Colour depthIndentation-scoped UTF-8 text, a strict JSON superset since 1.2
Size limits
Introduced2001
Developed byClark Evans, Ingy dot Net and Oren Ben-Kiki
StandardOpen
Browser supportNot displayed by browsers

What YAML is used for

  • CI pipeline definitions in GitHub Actions and GitLab
  • Kubernetes manifests and Docker Compose files
  • Application configuration that needs inline comments
  • Front matter at the top of Markdown content files

Strengths and limitations

What YAML does well

  • Comments and multi-line strings make it genuinely usable for configuration
  • Less punctuation noise than JSON for deeply nested structures
  • Anchors and aliases remove repetition within a document

Where YAML falls short

  • Significant whitespace means a stray space can change the meaning silently
  • Implicit typing turns values like no, on and 09 into surprises
  • The full specification is complex, so parsers differ in the corners

Convert YAML to

Every target this format can be written out as, each on its own page.

Convert to YAML

Everything that can be turned into a YAML file.

Questions about YAML

What is a .yaml file?

YAML holds the same information as JSON but lays it out as an indented outline, so a person can read and edit it comfortably. The extension .yaml or .yml identifies it, and its media type is application/yaml.

How do I open a YAML file?

Browsers do not display YAML natively, so you either need software that understands it or you convert it to something more common first. Converting is usually the faster route when you only need to look at the contents once.

Is YAML lossy or lossless?

Uncompressed. Nothing is discarded, so repeated saves never degrade the contents.

What is YAML good for?

Comments and multi-line strings make it genuinely usable for configuration. Less punctuation noise than JSON for deeply nested structures. Anchors and aliases remove repetition within a document. In practice that makes it a good fit for CI pipeline definitions in GitHub Actions and GitLab, and Kubernetes manifests and Docker Compose files.

What are the drawbacks of YAML?

Significant whitespace means a stray space can change the meaning silently. Implicit typing turns values like no, on and 09 into surprises. The full specification is complex, so parsers differ in the corners.

Other data formats

Data converter or the full format reference