Validate and pretty-print YAML — with error line numbers and key sorting.
Validate YAML and re-format it with consistent indentation. Invalid YAML shows the exact line of the problem; valid YAML can be re-indented and key-sorted. Powered by the spec-compliant js-yaml parser. Runs entirely in your browser.
Upload your file using the tool above.
Adjust any settings to your preference.
Click the process button and wait for results.
Download your output using the download button.
Almost always indentation. YAML forbids tabs for indentation — only spaces — and editors that insert tabs silently break files. Inconsistent indent depth between sibling keys is the other frequent cause. The reported line number points at where parsing failed, which is often just after the real mistake.
YAML infers types, and the rules catch people out. Unquoted yes, no, on and off become booleans; version numbers like 1.10 become floats and lose the trailing zero; and country code NO famously becomes false. Quote any value that must stay a string.
No — parsing and formatting run entirely in your browser. That matters because YAML files routinely hold deployment configuration, connection strings and secrets. Nothing is transmitted or stored, so you can safely paste a real config rather than sanitising it first.
Yes, YAML Formatter & Validator is completely free. No signup, no account, and no watermark on outputs. A Pro tier is available for 100 AI ops/day and larger file sizes.
YAML Formatter & Validator runs entirely in your browser. Your file is never uploaded — it is read, processed and saved locally, so it never reaches our servers or anyone else's. You can disconnect from the internet after the page loads and it still works.
What it does: Parses your YAML to confirm it’s valid, then re-emits it with consistent indentation and spacing. If it can’t parse, you get the exact line of the problem.
Powered by js-yaml: A spec-compliant YAML 1.2 parser, so edge cases like anchors, flow collections, and multi-line strings are handled correctly.
Privacy: Everything runs in your browser — your config is never uploaded, so it’s safe for secrets and internal manifests.