JSON, YAML, TOML: which config format

JSON, YAML and TOML all describe structured data, but each targets a use. Picking the right one saves hours of frustration over configuration files.

JSON: exchange

Strict, universal, perfect for APIs and program-to-program exchange. But it allows neither comments nor trailing commas, which makes it painful to hand-edit for configuration.

💡 Anecdote - YAML has its famous gotcha, the "Norway problem": written without quotes, the country code NO is read as the boolean false.

YAML: readability

Designed to be read and written by humans: indentation, comments, little punctuation. Its flexibility is also its trap - indentation is significant, and some unquoted values are interpreted surprisingly (a no can become a boolean).

TOML: explicit configuration

Built for config files: clear sections, unambiguous types, easy to review. It's the format of modern projects that want to avoid YAML's surprises.

Moving between them

Because they represent the same structures, conversion is direct. Our converters translate JSON, YAML and TOML both ways, locally in your browser

🤓 Did you know? TOML stands for "Tom's Obvious Minimal Language," after its creator Tom Preston-Werner, a GitHub co-founder. As for YAML, its name is a recursive acronym: "YAML Ain't Markup Language."