YAML Validator & Formatter
Check YAML structure and normalise indentation to 2 spaces for the common subset.
Enter your details below.
How to use
- Paste your YAML into the box.
- Click Validate & Format YAML.
- Fix any listed problems, or copy the normalised version.
About this tool
This tool is not a full YAML parser. It checks the common subset: indentation must use spaces in consistent steps, each mapping line must look like key: value or key:, list items must start with a dash, and the same key must not repeat at the same level. Tabs are rejected, because YAML forbids them. It then re-indents lines to two spaces per nesting level, based on their relative depth. Anchors, multi-line blocks, flow collections and other advanced YAML features are outside this subset and may be flagged even though a full parser would accept them.
Frequently asked questions
Is this a full YAML parser?
No. It covers the common subset of nested maps, lists and scalars, and advanced features may be flagged even if a full parser accepts them.
Why are tabs rejected?
Because YAML itself forbids tab indentation. A file with tabs will fail in most YAML tools, so flagging them early saves confusion.