YAML Validator
Check whether your YAML is syntactically valid and get precise, line-aware error messages without leaving the page.
Example
Valid input reports a green status:
name: CalcCafe
tags:
- yaml
- validator
Status: Valid YAML — root is a mapping (2 keys).
A broken document:
name: CalcCafe
port: 8080
Status: Invalid YAML at line 2, column 7: bad indentation of a mapping entry.
How it works
Type or paste YAML and it is parsed live with js-yaml; the status line shows a green OK with a document summary or a red message pinpointing the syntax error.
Good to know
This YAML Validator checks whether a block of YAML parses cleanly and tells you the structure it found, all without sending anything to a server. Paste or type your YAML and it parses on every keystroke using the js-yaml engine, so you see a green confirmation or a red error the instant the document becomes valid or breaks. It is aimed at developers and DevOps engineers working with config files for tools like Kubernetes, Docker Compose, GitHub Actions, Ansible, or any app that reads .yml settings.
Reach for it when an application refuses to start with a vague "could not parse config" message, when you have hand-edited a manifest and want a sanity check before committing, or when you are copying YAML between systems where indentation may have been mangled. Because it accepts multiple documents separated by --- via loadAll, it also works for files that bundle several manifests together.
Read the green status line as two pieces of information: confirmation that the syntax is valid, and a summary of what the root resolved to. A "mapping (N keys)" or "sequence (N items)" count is a quick way to confirm your data shaped up the way you expected; if you intended a list but see a mapping, your indentation or dashes are off even though the syntax is technically legal. Red errors include the line and column plus the parser's reason, so jump straight to that coordinate to fix the problem.
One important caveat: this validates syntax and structure only, not meaning. YAML that parses perfectly can still be wrong for its target tool if a required key is missing, a value has the wrong type, or a schema is violated. Also watch for YAML's well-known type quirks, such as bare yes, no, on, and off being read as booleans, and unquoted numbers like version 1.10 losing the trailing zero. For those concerns, pair this check with your tool's own schema validation.
Frequently asked questions
Does it support multi-document YAML (--- separators)?
Yes. It uses loadAll, so files with multiple --- separated documents are all parsed and validated, and the status reports how many documents were found.
Is my YAML sent to a server?
No. Validation runs entirely in your browser using the js-yaml library, so nothing you paste ever leaves your device.
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 is the difference between a YAML syntax validator and a schema validator?
A syntax validator like this one confirms the document is well-formed YAML and can be parsed at all. A schema validator goes further and checks that specific keys, value types, and required fields match a defined specification, such as a Kubernetes or JSON Schema definition.
Why does my YAML fail with a bad indentation error?
YAML uses spaces, not tabs, and every nesting level must be indented consistently relative to its parent. A bad indentation error usually means a line is indented with a tab, has the wrong number of spaces, or a mapping key sits at a level the parser did not expect.
Can YAML use tabs for indentation?
No. The YAML specification forbids tab characters for indentation, and parsers reject them. If a file looks fine but fails to parse, check for hidden tabs and replace them with spaces.
How do I validate multiple YAML documents in one file?
Separate each document with a line containing three dashes (---). A loadAll-based validator parses every document in the stream and reports how many it found, so a single multi-document file is validated in one pass.
Why is my YAML value being read as a boolean or number when I wanted a string?
YAML auto-detects types, so unquoted values like yes, no, true, on, off, and numeric strings are interpreted as booleans or numbers. Wrap the value in single or double quotes to force it to stay a string.
Is YAML a superset of JSON?
Yes, YAML 1.2 is designed to be a superset of JSON, so valid JSON is also valid YAML and can be pasted into a YAML validator. The reverse is not true, since YAML supports features like comments and anchors that JSON does not.
What does the column number in a YAML error message mean?
The column points to the character position on the reported line where the parser encountered the problem, counting from one. It helps you locate the exact spot, though the real cause is sometimes on a preceding line whose indentation set up the conflict.
Does validating YAML in the browser keep my data private?
When validation runs fully client-side, the text you paste is parsed by JavaScript in your own browser and is not transmitted to any server. This means sensitive configuration such as secrets or internal hostnames stays on your device.
Related tools