Developer & Data Platforms

YAML

Also known as: YAML Ain't Markup Language, YML

YAML is a text format for writing structured data, mainly configuration files, that uses indentation and simple dashes instead of brackets and quotation marks.

It's widely used in DevOps and cloud tools such as Kubernetes, GitHub Actions, Docker Compose, and Ansible. YAML is easy to read and allows comments. While it's friendlier than JSON for humans, its reliance on precise indentation and some surprising automatic type conversions can cause hard-to-spot errors.

YAML, explained at three levels

At home

YAML is like a tidy outline, where indentation shows which items belong under which heading. Computers read the outline to learn their settings.

At work

YAML files configure many cloud and automation tools, so small mistakes can affect live systems.

Real-world examples

At home

Carlos set up a home automation system configured with YAML. A single misaligned space broke it until his editor highlighted the error.

At work

Nadia manages Kubernetes for a Toronto startup. She added YAML linting to every pull request after a typo took down a service.

How it compares

featureYAMLJSON
StructureIndentationBraces and brackets
CommentsYesNo
Common useConfigurationData exchange
Error riskWhitespace mistakesPunctuation mistakes

YAML is easier to read. JSON is easier for machines to parse.

For analysts

Where configuration lives in YAML, I'd require review and automated validation. Configuration errors cause a large share of production outages.

History & origin

Clark Evans, Ingy döt Net, and Oren Ben-Kiki created YAML in 2001. Its name originally meant 'Yet Another Markup Language' but was changed to the recursive 'YAML Ain't Markup Language' to emphasize data over documents. YAML 1.2, published in 2009, aligned it more closely with JSON, making most JSON valid YAML. The rise of DevOps, configuration management, and Kubernetes in the 2010s made YAML ubiquitous, with some engineers joking that their job had become 'YAML engineering.' A famous quirk, the 'Norway problem,' saw older YAML parsers read the country code NO as 'false.' In my view, YAML is pleasant to read and painful to debug.