Validate YAML, fix indentation and see errors by line; convert YAML ↔ JSON. Comments are kept.
No sign-up, no fees.
Validate YAML and fix its indentation, with errors shown by line and column.
Convert YAML to JSON and JSON to YAML.
Comments are kept and multi-document (---) files are supported.
2 or 4 space indentation.
What you type is processed, but never shared with anyone.
YAML formatter and validator: how to use it
With Format and validate selected, paste your YAML.
If it's valid, the tidied version appears below; if not, you see the line and column of the error.
Choose 2 or 4 spaces of indentation.
Copy or Download the result.
Choose YAML → JSON to convert to JSON, or JSON → YAML for the reverse.
What is YAML?
YAML is a human-friendly data format written with indentation. Docker Compose, Kubernetes, GitHub Actions, Ansible and many apps use YAML for configuration. It's easy to read but very sensitive to indentation: a single space can change the meaning or break the file.
Common YAML mistakes
Using tabs: YAML indentation must use spaces; tabs cause errors.
Inconsistent indentation: Items at the same level must start with the same number of spaces.
No space after the colon: Write name: Ada, not name:Ada.
Duplicate keys: The same key can't appear twice at one level; the tool catches this.
Special characters: Quote values that contain : or #.
YAML vs JSON
JSON uses braces and quotes and is strict and precise for machines; YAML uses indentation and allows comments. Every JSON document is also valid YAML. The tool follows YAML 1.2: values like no, on and yes stay as text, so the country code "NO" doesn't turn into false.