YAML Formatter & Validator
Normalise indentation and catch YAML errors as you type.
YAML is indentation sensitive, so one misplaced space can change a document's meaning or break a deployment. This formatter parses your YAML, reports syntax errors with their line number, and rewrites the document with consistent two-space indentation.
Use it on Kubernetes manifests, Docker Compose files, CI workflows and OpenAPI definitions. The Tree view shows how the parser actually nested your keys, which is the fastest way to spot an indentation mistake.
How to use it
- Paste YAML into the editor.
- Fix any error shown in the banner, then press Format.
- Copy the cleaned document or convert it to another format.
Questions
Does formatting keep my comments?
No. The document is parsed and re-serialised, and comments are not part of YAML's data model. Keep a copy if the comments matter.
Why did my key order stay the same?
Formatting preserves key order. Use Sort keys in the More menu if you want keys sorted alphabetically.
Can I validate YAML against a schema?
Yes. Press Validate and paste a JSON Schema; the parsed YAML is checked against it.
All tools
- JSON Formatter
- JSON Validator
- JSON Minifier
- JSON Repair
- JSON Diff
- JSON Schema Validator
- JSON to YAML
- YAML to JSON
- JSON to CSV
- CSV to JSON
- JSON to XML
- XML to JSON
- YAML Formatter
- XML Formatter
- JSONL Validator
- JSON to TOON
- LLM Token Counter
- LLM Token Optimizer
- JSON to TypeScript
- JSON Schema Generator
- LLM Tool Schema Generator