Skip to main content

What is YAML?

YAML (YAML Ain't Markup Language) is a human-friendly data serialization format used primarily for configuration files. It uses indentation and minimal punctuation, making it more readable than JSON or XML. YAML is widely used in CI/CD pipelines, Kubernetes manifests, Docker Compose, and application config.

YAML was created in 2001 and has evolved through several specifications (currently YAML 1.2). Unlike JSON, YAML relies on significant indentation, similar to Python, and supports comments with the # symbol. These features make it ideal for hand-edited configuration files.

YAML supports scalars (strings, numbers, booleans, null), sequences (lists), and mappings (key-value pairs). It also has advanced features such as anchors, aliases, and multi-document streams separated by ---.

Because indentation is meaningful, YAML can be error-prone for beginners. A YAML validator helps catch structural mistakes before deployment, and conversion tools can switch between YAML and JSON when needed.

Related tool

Try our free online YAML Validator — runs in your browser, no upload needed.

Open YAML Validator

Related terms

Frequently asked questions

Is YAML better than JSON?

For human-edited configuration, YAML is usually better thanks to comments and indentation. For machine-to-machine data exchange, JSON is simpler and faster to parse.

Does YAML support comments?

Yes. YAML supports comments using the # symbol, which JSON does not. This is one reason YAML is preferred for configuration files.

Why is YAML indentation-sensitive?

YAML uses indentation to define structure instead of brackets. This improves readability but means even a single space error can break the file. A YAML validator catches such mistakes.