Convert JSON to TOML

Convert JSON to TOML free in your browser. No upload, no signup, no watermark. Files stay on your device.

privatepowered by smol-toml
jsontoml

drop a .json file

or click to browse

related

more json & toml

see all data & code converters →

guide

how to convert json to toml

  1. Drop your JSON file

    Drag your JSON file into the drop zone above, or click the box to pick a file from your computer or phone. The browser reads the file directly — nothing uploads.

  2. Click Convert

    The page runs smol-toml on your device to decode the JavaScript Object Notation and encode it as Tom's Obvious Minimal Language. Most conversions finish in a few seconds; large or codec-heavy files (RAW, video) can take longer.

  3. Download the TOML file

    When the conversion finishes, the TOML file is ready to download. Save it anywhere on your device.

FAQ

common questions

Why convert JSON to TOML?

TOML is designed specifically for configuration files — Rust's Cargo.toml is the best-known example, and increasingly more tools (Python's pyproject.toml, Hugo configs, various Rust ecosystem files) use it. If you have config data in JSON and want to publish it as TOML for one of these tools, conversion saves rewriting it by hand.

How does JSON structure map to TOML?

Top-level JSON objects become TOML tables (`[tablename]`); nested objects become nested tables (`[parent.child]`); arrays become TOML arrays. Primitive values (strings, numbers, booleans, null) translate naturally. TOML's stricter typing (it has native date / time types) gives slightly richer output than JSON for any temporal fields.

Will TOML be more readable than my JSON?

Usually yes for configuration. TOML uses INI-like section headers and explicit key=value pairs, which read more clearly than nested JSON brackets for typical config workloads. For deeply nested data structures, JSON or YAML may be cleaner.

What about JSON null?

TOML has no null type — every key must have a value. The converter typically omits keys with null values (rather than fabricating a placeholder). If you need to represent 'absent' explicitly, use an empty string or empty array depending on context, or stick with JSON.

Can I add comments after converting?

Yes — TOML supports `# comment` syntax (similar to Python / Ruby). The conversion gives you plain TOML; you can hand-edit afterward to add comments documenting each section or value. This is one of TOML's strengths over JSON: configs become self-documenting.