YAML Parser
Paste YAML to validate it instantly and get back tidy, re-serialized output with any parse errors clearly reported.
Example
Messy input gets validated and normalized to clean 2-space YAML:
Input:
name: My App
tags: [web, cli]
db: {host: localhost, port: 5432}
Output:
name: My App
tags:
- web
- cli
db:
host: localhost
port: 5432
Status: Valid YAML.How it works
Your YAML is parsed with js-yaml entirely in the browser, then dumped back out with consistent 2-space indentation. Invalid input shows the error message and line number in the status bar.
Good to know
The YAML Parser takes raw YAML you paste in, checks whether it is syntactically valid, and re-emits it as clean, normalized text with uniform 2-space indentation. It is built for developers and DevOps engineers who spend their days editing config files for tools like Kubernetes, Docker Compose, GitHub Actions, Ansible, or CI pipelines, where a single misplaced space or tab can silently break a deployment.
Reach for it whenever a parser elsewhere rejects your file and you want to find out exactly why, or when you have hand-edited YAML using inline (flow) syntax and want it expanded into the more readable block form. It is also handy for tidying up config that several people have touched, since it standardizes indentation and quoting so diffs stay small and reviewable.
Reading the result is straightforward: the status bar shows "Valid YAML" in green when parsing succeeds, and for multi-document files it tells you how many documents (separated by ---) it found. On failure it prints the parser's error message plus a 1-based line number, so you can jump straight to the offending line in your editor. The output pane only fills in when the input parses cleanly.
One caveat worth knowing: normalization is a feature, not just cosmetics. The tool rebuilds your YAML from the parsed data, so anchors and aliases are expanded (references are not preserved), comments are dropped, and keys keep their original order rather than being sorted. If you depend on comments or YAML anchors, keep your original file and use this output for validation and inspection rather than as a drop-in replacement.
Frequently asked questions
Does it support multiple YAML documents separated by ---?
Yes. Each document separated by --- is parsed and re-emitted, and the status bar reports how many documents were found. Invalid syntax in any document is reported with its line number.
Is my YAML sent to a server?
No. Parsing and formatting run entirely in your browser using the js-yaml library, so your data never leaves your machine.
Is my data uploaded anywhere?
No — this tool runs entirely in your browser. Your input never leaves your device and it works offline once loaded.
Is it free?
Yes, completely free with no sign-up and no limits.
People also ask
What's the difference between a YAML parser and a YAML validator?
A validator simply tells you whether the syntax is correct, while a parser actually loads the YAML into a data structure and, in this tool's case, re-serializes it as clean output. This tool does both: it validates and returns normalized YAML.
Why does my YAML break when I use tabs for indentation?
The YAML specification forbids tab characters for indentation; only spaces are allowed. If a parser reports an indentation error, replace any leading tabs with spaces, typically two per level.
Does this tool convert YAML to JSON?
No. It parses YAML and outputs normalized YAML, not JSON. The parsing runs with the js-yaml library in JSON-compatibility mode turned off.
What does normalizing YAML actually change?
It rewrites the file with consistent 2-space indentation, expands inline flow collections like [a, b] and {x: y} into block style, and drops comments. The underlying data and key order are preserved.
Can I paste a Kubernetes or Docker Compose file into it?
Yes. Any valid YAML works, including Kubernetes manifests, Docker Compose files, and GitHub Actions workflows. Multi-document manifests separated by --- are each parsed and reported.
Why are my YAML comments missing from the output?
The tool parses YAML into data and re-emits it, and comments are not part of the parsed data, so they are not preserved. Keep your original file if you need the comments.
How do I find the line that's causing a YAML error?
When parsing fails, the status bar shows the parser's error message along with a 1-based line number in parentheses, pointing you to where the syntax problem occurs.
Is it safe to paste sensitive config like passwords or secrets?
Parsing and formatting run entirely in your browser, so the input is not transmitted to any server. As with any tool, avoid pasting secrets on a shared or untrusted device.
Related tools