YAML validator and formatter
Paste YAML from a Docker Compose file, a GitHub Actions workflow, a Kubernetes manifest or any config file. The validator checks it as you type, explains each error in plain words with the line and column, and warns about values that other tools may read differently. Valid YAML is converted to JSON or cleanly formatted YAML. Nothing is uploaded.
Free · No sign-up
How to use it
- Paste your YAML, open a .yaml or .yml file, or load one of the examples.
- Read the status under the box. Valid YAML shows the number of keys and documents; an error shows the line, the column and what to fix.
- Click Show in input to jump to the error, and check the hints for values such as yes or 0755 that other tools may read differently.
- Choose JSON or formatted YAML, pick the indentation, and copy or download the result.
Why use this tool
Exact error location
Every error shows the line and column, a snippet with a pointer, and a plain-language explanation.
Hints beyond syntax
Flags yes and no, leading zeros, version numbers and missing spaces after colons before they cause bugs.
YAML to JSON
Convert valid YAML to JSON with 2 or 4 spaces or in compact form. Several documents become a JSON array.
YAML formatter
Re-indent messy YAML consistently and sort keys alphabetically.
Ready for real configs
Works with Docker Compose, GitHub Actions, Kubernetes, Ansible and OpenAPI files, including --- separated documents.
Private
Validation runs in your browser, so secrets in your configs are never uploaded.
The most common YAML errors
| Error | Cause | Fix |
|---|---|---|
| Bad indentation | A key or list item has more or fewer spaces than its neighbours | Line up items at the same level with the same number of spaces |
| Tabs in indentation | The line is indented with a tab | Replace tabs with spaces |
| Duplicate key | The same key appears twice in one mapping | Remove or rename one of them |
| Missing space after colon | key:value is written without a space | Write key: value |
| Colon inside a value | A value such as Note: important contains ": " | Put the value in quotes |
| Unclosed quote or bracket | A " ' [ or { is opened but not closed | Add the closing character |
Values that surprise people
YAML guesses the type of unquoted values. In YAML 1.1, used by PyYAML, Ansible and many older tools, yes, no, on and off become true or false, so a country code like NO for Norway turns into false. Numbers with leading zeros such as 0755 may be read as octal, and a version like 1.10 becomes the number 1.1.
This validator follows YAML 1.2, which is stricter, and warns you about these values. The safe rule: put quotes around anything that must stay text, such as versions, codes, phone numbers and postal codes.
YAML vs JSON
| YAML | JSON | |
|---|---|---|
| Comments | Yes, with # | No |
| Structure | Indentation | Braces and brackets |
| Quotes | Usually optional | Required for keys and text |
| Several documents in one file | Yes, separated by --- | No |
| Typical use | Config files written by people | Data exchanged between programs |
Privacy
Config files often contain passwords, tokens and internal hostnames. This tool parses your YAML in your browser with the open-source js-yaml library and never sends it anywhere. Your last input is kept in this browser only, so it is still there when you come back.
Frequently asked questions
How do I check if my YAML is valid?
Paste it into the box above. The status line tells you at once whether it is valid. If not, it shows the line and column of the first error and what to change.
Why does my YAML say bad indentation?
Items at the same level must start at exactly the same column. Usually one line has an extra or missing space, or a list item is not lined up with the ones above it.
Can I use tabs in YAML?
No. YAML only allows spaces for indentation. Pressing Tab in this editor inserts two spaces for you.
Does it check Kubernetes or Docker Compose rules?
It checks YAML syntax and common pitfalls, not the schema of a specific tool. A file can be valid YAML but still have a misspelled Kubernetes field.
How do I convert YAML to JSON?
Paste valid YAML, keep JSON selected on the right and click Copy result or Download. A file with several --- documents becomes a JSON array.
Are comments kept when formatting?
No. Formatted YAML and JSON are rebuilt from the data, so comments and anchors are not kept. Your original text in the left box is unchanged.
YAML syntax guide with examples
Related tools
Need something built?
Tell us what you want to create.
Tell us what you need built, from a simple website to a complete app, AI solution, automation, or custom system.