Structured Data
YAML Validator
Paste YAML to check it instantly. Invalid input is reported with the exact line and column, a plain-language explanation and a snippet that points at the problem. Valid input is summarised and can be reformatted as clean YAML or JSON — all in this tab.
YAML input
paste or typeParsed with a strict YAML parser in this tab. Press Ctrl/⌘ + Enter to check immediately. Nothing is uploaded.
Validation
livePaste or load YAML to validate it.
Warnings
Formatted output
Formatting is available when the YAML is valid.
How it works
The input is parsed by a small YAML parser that runs in this tab. It understands
block and flow mappings and sequences, quoted and plain scalars, block scalars
(| and >), anchors, aliases, merge keys
(<<), tags and multi-document files. Errors always report a line
and column, explain the problem in plain language and show a snippet with a caret
marking the spot. Valid documents are summarised with their structure and can be
copied or downloaded as normalised YAML or equivalent JSON. Nothing is uploaded.
Practical uses
Validate YAML and report a syntax error with its line, column, plain-language message and caret frame, then reformat valid input as YAML or JSON.
Common ways to use it
- Check a Kubernetes manifest or CI workflow before committing it.
- Find the exact line where a Docker Compose file or multi-document manifest breaks.
- Convert a YAML config into equivalent JSON for another tool.
Malformed YAML: bad indentation
Input
a: 1 b: 2
Output
Line 2, column 3: Unexpected indentation. Hint: Align mapping entries at the same level. For multi-line text, use a block scalar (| or >). 1 | a: 1 2 | b: 2 | ^
The line, column, message and caret frame come from the tool's validation functions. Tabs used for indentation are also rejected ("Tabs cannot be used for indentation.", line 2, column 1). Valid input such as "name: demo" with a ports list parses and reformats to normalised YAML or JSON.
Options that matter
- Output format — Formatted YAML (normalised two-space indentation) or equivalent JSON.
- Examples — six bundled samples covering deployments, anchors and merge keys, an invalid workflow, multi-document manifests, block scalars, and a broken file.
Things to keep in mind
- The parser supports block and flow mappings and sequences, quoted and plain scalars, block scalars (| and >), anchors, aliases, merge keys (<<), explicit tags, and multi-document files, but it is a focused implementation rather than a full YAML 1.2 conformance suite.
- Duplicate mapping keys are collected as warnings, not errors; the last value wins.
- Formatting output is available only when the input is valid.
- Validation runs in the browser; nothing is uploaded.