.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 type | Hierarchical |
|---|---|
| Human readability | High |
| Nesting support | Yes |
| LLM token efficiency | Medium |
| File extension | .yaml |
| MIME type | application/yaml |
| Best for | Kubernetes 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
- JSON vs YAML vs TOML vs .env: Config Format Field GuideCompare JSON, YAML, TOML, and .env configuration formats across comments, nesting, secret safety, and tool ecosystems—and convert locally.
- Why Server-Side Paste Tools Leak Secrets — Zero-Upload ArchitectureLearn why pasting .env files, JWTs, customer CSVs, or contracts into cloud converters leaks data—and how to verify 0 bytes uploaded locally.
- How to Mask CSV & JSON Customer Data Before AI AnalysisAnonymize sensitive CSV columns, scale financial revenue proportionally (×k), and mask nested JSON keys locally in browser RAM without breaking file syntax.
- XML to JSON: Preserving Attributes, CDATA & RSS FeedsConvert XML, RSS, and SVG files to JSON in browser RAM while preserving @_ attributes, CDATA text, numeric types, and round-trip XML structure.
Related Formats
All 24 formatsYAML 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.