.yaml · application/yaml

YAML: YAML Ain't Markup Language

YAML 1.2 is an indentation-sensitive serialization language supporting comments, anchors, multiline strings, and multi-document streams separated by ---.

Quick Answer: YAML 1.2 is an indentation-sensitive serialization language supporting comments, anchors, multiline strings, and multi-document streams separated by ---. Kubernetes manifests, GitHub Actions workflows, Docker Compose files, and human-edited configs.

Structure typeHierarchical
Human readabilityHigh
Nesting supportYes
LLM token efficiencyMedium
File extension.yaml
MIME typeapplication/yaml
Best forKubernetes manifests, GitHub Actions workflows, Docker Compose files, and human-edited configs.

Strengths

  • Supports inline # comments and clean multiline blocks without braces
  • Allows multiple documents inside one file via --- separators
  • Native superset of JSON with clean readability for ops manifests

Trade-offs

  • Whitespace-only indentation errors can silently break structure
  • YAML 1.1 unquoted scalars like NO or ON can coerce unexpectedly to booleans
  • Complex spec and anchor references increase parsing complexity

References

Convert & clean YAML locally

Related engineering guides

Related Formats

All 24 formats

YAML frequently asked questions

What is the Norway problem in YAML?

In YAML 1.1, unquoted country codes like NO or values like yes/on/off are parsed as booleans instead of strings. Always quote ambiguous scalars or inspect JSON output.

Can a single YAML file contain multiple documents?

Yes. Kubernetes manifests commonly separate multiple resources using --- lines, which YAML to JSON parses via multi-document loadAll.

Is .yml different from .yaml?

No. Both extensions hold identical YAML syntax; .yaml is the official recommendation while .yml remains common in CI and Docker files.