YAML Validator
Validate YAML syntax, find duplicate keys, indentation issues, tabs in indent, and trailing whitespace. JSON preview included.
JSON preview
What this does
Validates YAML and surfaces specific issues by line number. Three severity levels:
Errors (red) — the document won’t parse:
- Tab characters in indentation (YAML spec forbids)
- Duplicate top-level keys (the second value silently overrides the first in most parsers — surprising bug)
- Unbalanced quotes, missing colons, malformed structure
Warnings (yellow) — parses, but probably bugs:
- Indent levels that aren’t multiples of the first indent (mixed 2-space and 4-space)
- Trailing whitespace on lines (silent killer when copy-pasting)
- Values starting with reserved characters (
@,!,&,*) without quoting
Info (blue) — parses, but flagged so you don’t trip on it later:
- Keys with no value (parses as
null— easy to assume""orfalseinstead)
The “JSON preview” panel below shows what the YAML actually parses to. Useful when the YAML looks right but the data doesn’t match what your application expects (often because of one of the above issues).
Why YAML keeps biting people
YAML was designed to be human-friendly. It is — until it isn’t:
- Norway problem:
country: NOparses ascountry: falsebecauseNOis a reserved boolean. Quote it:country: "NO". - Sexagesimal numbers:
time: 30:00:00parses as 108000 (seconds). Quote it as a string. - Octal numbers:
version: 010parses as 8 in YAML 1.1, the string"010"in YAML 1.2. Always quote version numbers. - Indentation: mix tabs and spaces and you get parse errors that don’t always mention the line. Always spaces, always consistent.
- Multi-line strings:
|preserves newlines,>folds them,|-strips trailing newline. Pick the wrong one and your shell script breaks.
This validator catches the structural issues. The semantic ones (Norway problem, octal version numbers) need YAML 1.2 strict mode in your real parser — flag those by quoting any value that looks like a reserved word, number, or date.
What this is NOT
- Not a YAML 1.2 spec-conformant parser. This is a permissive parser plus a linter. Production tools should use the official parser of their target language (PyYAML, snakeyaml, gopkg.in/yaml.v3).
- Not a JSON Schema validator. Use a JSON Schema tool for that — paste the JSON preview output into one.
- Not an OpenAPI / Kubernetes / Helm validator. Format-specific validators (e.g.,
kubeval,kubeconform) check against schemas this generic tool doesn’t have.
Privacy
Runs entirely in your browser. Your config never leaves your machine.