title = "Anvil" ports = [ 8080, 8443 ] [owner] name = "Ada" active = true
About JSON to TOML & TOML to JSON Converter
Convert JSON to TOML and TOML to JSON without leaving your browser. Paste a JSON object and get clean, idiomatic TOML with proper tables, arrays of tables, and inline tables — or paste a `Cargo.toml`, `pyproject.toml`, or any config file and turn it straight back into structured JSON. It's the quick bridge devs need when wiring config between tools, APIs, and editors.
The converter understands the full TOML 1.0 grammar: nested tables, array-of-tables (`[[x]]`), inline tables, and datetimes that map deterministically to ISO strings in JSON. Everything runs locally and fully offline — nothing you paste is uploaded — so it's safe for production config and secrets.
Features
- JSON object → TOML, with tables, arrays of tables, and inline tables
- TOML → pretty-printed JSON, with datetimes mapped to ISO strings
- Spec-compliant TOML 1.0 parsing and serialisation in both directions
- Runs entirely offline in your browser — your config never leaves the device
How to use
- Paste a JSON object, or a TOML config file, into the input pane.
- Pick JSON → TOML or TOML → JSON from the toolbar.
- Copy the converted result from the output pane — or clear and start again.
Frequently asked questions
Why does JSON → TOML reject a top-level array or null?
TOML documents are always a table (a set of key/value pairs) at the top level — the format has no way to represent a bare array, null, or primitive as a whole document. Wrap your data in an object (e.g. {"items": [...]}) and it converts cleanly.
How are TOML tables and arrays of tables handled?
Nested JSON objects become TOML [table] and [nested.table] headers, and JSON arrays of objects become array-of-tables ([[x]]). Arrays of primitives are rendered inline. Going the other way, all of these parse back into the equivalent JSON structure.
What happens to TOML dates and times?
TOML datetimes are parsed and emitted as ISO-8601 strings in JSON (e.g. 1979-05-27T07:32:00.000Z), so they round-trip deterministically and stay readable.
TOML vs JSON — when should I use each?
TOML is designed for human-edited configuration: it has comments, native datetimes, and obvious section headers, which is why files like Cargo.toml and pyproject.toml use it. JSON is better for machine-to-machine data exchange and APIs. Converting between them lets you keep config in TOML while feeding tools that only read JSON.
Is my config uploaded anywhere?
No. All parsing and conversion happen locally in your browser. Your input never leaves your device, so it works offline and is safe for sensitive configuration and secrets.
Related tools
Everything runs locally in your browser — your input is never uploaded.