What the YAML tool does
YAML is the format behind Kubernetes manifests, Docker Compose, GitHub Actions and many other config files. It is easy to read but easy to break: one wrong indent changes the meaning, and a tab can stop the file from loading. This tool checks your YAML, points to the line and column of a syntax error, reformats it with a clean indent, and converts to and from JSON.
How to use it
- Validate and format: paste YAML. If it is valid it is rewritten with consistent indentation. If not, the error shows the line and column.
- YAML to JSON: paste YAML and copy the JSON.
- JSON to YAML: paste JSON and copy the YAML.
- Choose a 2 or 4 space indent and, if you like, sort the keys alphabetically.
Common YAML errors
- Tabs used for indentation. YAML allows spaces only.
- Inconsistent indentation, so a key lands under the wrong parent.
- A missing space after a colon: key:value is not a mapping, key: value is.
- Unquoted special values: yes, no, on, off and null can be read as booleans or null in some parsers. Quote text that must stay a string.
- A colon or a hash inside a value that is not quoted.
Good to know
The tool reads your YAML as data and writes it back, so comments are not kept after formatting or conversion. Keep your original if the comments matter. Different tools follow slightly different YAML versions, so also test the file in the system that will use it.
Related tools
- Universal Config Converter: Convert between .properties, JSON, and YAML formats instantly. 100% client-side.
- JSON Formatter & Validator: Format, validate, and beautify JSON with clear error messages for developers.
- JSON to CSV & CSV to JSON Converter: Convert JSON arrays to CSV and CSV to JSON with quotes, nested objects and custom delimiters handled.
- Diff Checker: Compare two blocks of text and instantly see line-by-line additions, deletions, and unchanged content.
