YAML Formatter & Validator
Format and check YAML with consistent indentation.
Using toolbook means you agree to our Terms and Privacy Policy.
Your files stay on your device
How to use it
Paste your YAML to get it back with tidy, consistent indentation. If something’s wrong, you see a clear error with the line number. Your YAML stays on your device.
YAML cares about spaces: one wrong indent can break a whole file, often with a confusing error. Paste yours here to check it and tidy it up.
If it’s valid, you get a neatly indented version to copy or download. If not, you see the error, usually with the line number to look at.
Heads up: comments are removed when the file is tidied, so if you need to keep them, use this just to check your file is valid.
FAQ
Why does YAML break so easily?
It uses spaces to show structure, so one misplaced space can change what a line means.
Does it keep my comments?
No, comments are removed when it tidies the file. Use it as a validity check if you need to keep them.
Can anyone else see my YAML?
No. It’s formatted on your device and never sent anywhere.
How it worksFor the curious
The document is parsed into a plain JavaScript value with the yaml library and re-serialised with your chosen indentation, which normalises spacing however the original was written.
The yaml library supports block and flow collections, anchors and aliases, multi-document streams, and standard scalar types such as numbers, booleans, and dates. A hand-written parser for that much of the spec would be incomplete or nearly as large.
Parse errors come straight from the parser and usually include a line number. Comments are lost on re-serialisation, the usual trade-off for format-and-validate tools.