Why this is separate from the JSON ↔ YAML converter#
This site already has a JSON/YAML Converter for moving data between the two formats. This tool is different: it never leaves YAML — it parses the document and re-serializes it as YAML again, purely to normalize indentation and catch syntax errors, for the much more common case where you already have YAML and just want it cleaned up, not converted to something else.
Why re-parsing catches things a text editor cannot#
YAML's indentation carries structural meaning — two spaces of drift can silently change which key a value belongs to, or turn a nested map into a sibling. A text editor's auto-indent can only guess at intent; parsing the document properly and re-serializing it from the actual parsed structure is the only way to guarantee the output means exactly what the input meant, just formatted consistently. This tool uses the same real YAML parser as this site's JSON/YAML Converter rather than a hand-rolled indentation fixer, for the same reason: YAML's rules around anchors, multi-line strings and implicit typing are easy to get subtly wrong by hand.
Duplicate keys: an error some other parsers let through#
The YAML spec says duplicate keys at the same level should be treated as an error, but not every parser enforces that — some silently keep only the last value, hiding a real bug (an accidentally duplicated key nobody meant to repeat) as if nothing were wrong. This tool's validation catches duplicate keys as a genuine error, matching the stricter, spec-correct behavior.