YAML, TOML and INI validator and converter

Paste a config file to check it for errors and convert it to another format. YAML, TOML, INI and JSON are supported in both directions, and mistakes are reported with the line number.

JSON

How to use the YAML validator and converter

  1. Paste your config or click Open File. The format is detected for you.
  2. If there is a mistake, the message under the boxes gives the line and the reason.
  3. Choose the format to convert to, then click Copy or Download.

The four formats side by side

FormatUsed byStrengthsWatch out for
YAMLDocker Compose, Kubernetes, GitHub Actions, AnsibleEasy to read, supports comments and nestingIndentation errors and surprising types
TOMLRust (Cargo), Python (pyproject), Hugo, many CLI toolsClear types, hard to get wrongDeep nesting gets wordy
INIphp.ini, Git config, systemd units, Windows appsVery simpleNo standard, no nesting, everything is text
JSONAPIs, package.json, most toolingStrict and universalNo 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:8080 is one string, while port: 8080 is a key and a value.
  • Values that change type. no, off and yes can be read as true or false by older tools, a version such as 1.10 becomes the number 1.1, and 08 may 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.