How to use the YAML validator and converter
- Paste your config or click Open File. The format is detected for you.
- If there is a mistake, the message under the boxes gives the line and the reason.
- Choose the format to convert to, then click Copy or Download.
The four formats side by side
| Format | Used by | Strengths | Watch out for |
|---|---|---|---|
| YAML | Docker Compose, Kubernetes, GitHub Actions, Ansible | Easy to read, supports comments and nesting | Indentation errors and surprising types |
| TOML | Rust (Cargo), Python (pyproject), Hugo, many CLI tools | Clear types, hard to get wrong | Deep nesting gets wordy |
| INI | php.ini, Git config, systemd units, Windows apps | Very simple | No standard, no nesting, everything is text |
| JSON | APIs, package.json, most tooling | Strict and universal | No comments, easy to miss a comma |
Common YAML mistakes
- Tabs for indentation. YAML allows only spaces. A single tab gives an error.
- Uneven indentation. Items at the same level must line up exactly.
- Missing space after a colon.
port:8080is one string, whileport: 8080is a key and a value. - Values that change type.
no,offandyescan be read as true or false by older tools, a version such as1.10becomes the number 1.1, and08may be read as text. Put quotes around anything that must stay text. - Special characters. A value containing
:or starting with*,&,@or%needs quotes. - Duplicate keys. Repeating a key in the same block is an error, and this validator reports it.
What is lost when converting
Comments are not carried over, because JSON has nowhere to put them and each format writes them differently. INI can only hold one level of sections with simple values, so deeper structures are written as dotted section names. TOML has no null, so empty values are left out.
Checking a Kubernetes manifest? The Kubernetes YAML validator also checks the resource fields. For plain JSON work, use the JSON formatter, and for .env files the .env editor.
Private by design
This tool runs entirely in your web browser. Nothing you type or paste is sent to a server, logged or stored, so it is safe to use with internal addresses, configuration files and other work data. There is no sign-up and it keeps working offline once the page has loaded.
Frequently asked questions
How do I validate a YAML file?
Paste it into the input box. If it is valid you will see a confirmation and the converted output. If not, the message gives the line number and what is wrong.
Can I convert YAML to TOML or TOML to YAML?
Yes. Paste either one and choose the other under Convert to.
Why do I get “bad indentation” in YAML?
A line is indented with a tab, or with a different number of spaces from its neighbors at the same level.
Are comments kept when converting?
No. Comments are dropped, because the formats store them in different ways and JSON does not allow them at all.
Does it support several YAML documents in one file?
Yes. Documents separated by --- are all checked, and converted to a list.