YAML Guides & Reference
Practical guides for understanding and working with YAML — from how its significant indentation works to real-world tooling like diffing and JSON conversion.
Indentation & Formatting
How YAML Indentation Works
In YAML, indentation is structure — not decoration. How spaces define nesting, why tabs are banned, and the rules that trip people up.
Read guide →
Parse YAML in Python
PyYAML and ruamel.yaml — safe_load, dump, indentation control, and preserving comments.
Read guide →
Parse YAML in JavaScript
js-yaml load and dump, indent options, and handling multi-document streams in Node.js and the browser.
Read guide →
Validation & Errors
Comparison & Conversion
Comparing Two YAML Files: A Guide to YAML Diffing
Why a text diff misleads for YAML, what a structure-aware diff shows, and how to compare two YAML files online.
Read guide →
Converting YAML to JSON (and Back)
YAML is a superset of JSON, so conversion is mostly lossless — but a few features don't survive the round trip. Here's what to watch for.
Read guide →
How to Minify YAML (and Why You Usually Convert Instead)
YAML can't be collapsed to one line like JSON. What minifying YAML actually does, and when flow style or JSON is the better answer.
Read guide →