Validate and reformat YAML, keeping comments and anchors. Multi-document files work. Runs entirely in your browser, so nothing is uploaded.
6 answers to what people ask most about the YAML Formatter.
Paste it in. Errors show the line, column and a snippet of the problem, such as bad indentation, a tab character or a duplicate key.
Yes. Comments, anchors (&name), aliases (*name) and merge keys (<<) are kept, because the file is reformatted rather than converted to data and back.
The YAML spec forbids tabs for indentation. Replace them with spaces, usually two per level.
Yes. Documents separated by --- are each validated and formatted, which suits Kubernetes manifests with several resources.
On, list items are indented under their parent key. Off, the dash lines up with the key, which is the style kubectl and many Kubernetes examples use. Both are valid YAML.
Yes. It's free with no sign-up or limits, and it runs entirely in your browser, so what you type or paste never leaves your device. It works on phones and computers alike.
Something not working? Tell us and we'll fix it.
Report an issue