Skip to content

JSON to TOML — objects to indented TOML tables

Paste a JSON object and get readable TOML tables for READMEs and config samples. Use TOML to JSON when you need the structured form again.

JSONTOML

Converts as you type — paste or drop a file.

Input(JSON)
Output(TOML)

Runs in your browser — nothing is uploaded to our servers.

TOML scans cleanly in documentation. Turning a JSON blob into indented tables here is enough for README samples and small tool configs without pulling a heavy library into the browser.

Nested objects become [section] tables; scalars stay on their keys. Keep the root an object — that matches how TOML files are usually written.

If you started from YAML, convert with JSON to YAML in the other direction, or clean JSON first with JSON formatter.

How to use

  1. Paste a JSON object
  2. Convert
  3. Copy the TOML

Why this converter

  • Turns nested JSON into readable TOML tables
  • Expects an object root, matching real config files
  • Works with a sample you can tweak in place

Good for

  • README config blocks
  • Tooling snippets
  • Human-readable exports

Tips

  • Arrays of objects are not supported — reshape them first.
  • Pretty-print JSON before converting if nesting looks wrong.

Examples

Input Output Note
{"name":"demo"} name = "demo" —
{"db":{"host":"localhost","port":5432}} [db] host = "localhost" port = 5432 Nested objects become [tables]

JSON → TOML FAQ

Need JSON again?
Use TOML to JSON.
Why must the root be an object?
TOML documents are keyed tables. A bare JSON array at the root has nowhere natural to sit — wrap it in an object first.
Arrays of objects?
Out of scope for this lightweight writer. Flatten or convert those structures with a fuller TOML library.

Related