What Is TOML? (And How It Compares to JSON & YAML)
TOML (Tom's Obvious, Minimal Language) is a configuration file format designed to be easy for humans to read and unambiguous for machines to parse. If you've seen a Cargo.toml or pyproject.toml, you've used TOML.
Convert between TOML and JSON
Need to move config between formats? The JSON ↔ TOML converter turns JSON into TOML and back, right in your browser.
What TOML looks like
title = "OhoTool"
[owner]
name = "Alex"
active = true
[database]
server = "192.168.1.1"
ports = [8000, 8001]Values are key = value pairs; [section] headers create nested tables. It reads almost like an old-school INI file, but with real types (strings, numbers, booleans, dates, arrays).
Where it's used
- Rust —
Cargo.tomlfor package config. - Python —
pyproject.toml, the modern standard for project metadata. - Many CLI tools and static-site generators use it for settings.
TOML vs. JSON vs. YAML
- JSON — great for data and APIs, but noisy for humans (quotes, braces, no comments).
- YAML — very readable, but whitespace-sensitive and easy to get subtly wrong.
- TOML — readable like YAML, but explicit and unambiguous like JSON, with comments and clear typing. Ideal for config, less suited to deeply nested data.
FAQ
Is TOML better than YAML?
For flat-to-moderately-nested configuration, many find TOML clearer and less error-prone (no significant whitespace). YAML can be nicer for deeply nested structures.
Can I convert TOML to JSON?
Yes — paste it into the converter and switch to the TOML → JSON tab.
Does TOML support comments?
Yes — anything after a # on a line is a comment, which JSON doesn't allow.
Try the JSON to TOML
Convert between JSON and TOML both ways.
