Free JSON to TOML — tables · [[arrays]] · inline values

Convert JSON to TOML
Tables, array of tables
and all TOML types.

Convert any JSON object to valid TOML. Nested objects become tables, arrays of objects become [[sections]]. Runs entirely in your browser.

Your data never leaves your browser
Nested objects → [tables]
Arrays of objects → [[sections]]
Always free
JSON to TOML Converter   100% client-side
TOML requires all keys at the root level to be either scalars or tables. Arrays of primitive values become inline TOML arrays. Arrays of objects become [[array of tables]].
JSON input
  TOML ready

      
JSON to TOML conversion rules

How JSON types and structures map to TOML equivalents.

JSONTOML outputNotes
{"key": "value"}key = "value"Root-level strings
{"a": {"b": 1}}[a]
b = 1
Nested objects → tables
{"a": {"b": {"c": 1}}}[a.b]
c = 1
Deep nesting → dotted headers
{"arr": [1, 2, 3]}arr = [1, 2, 3]Scalar arrays → inline
{"bins": [{...}, {...}]}[[bins]]
...
[[bins]]
...
Object arrays → array of tables
true / falsetrue / falseDirect mapping
42 / 3.1442 / 3.14Numbers without quotes
null""TOML has no null — becomes empty string
Popular searches
json to toml convert json to toml json to toml online json to toml converter json to toml python json to toml javascript json to cargo toml

JSON serialized to valid
TOML. No upload needed.

The TOML serializer correctly handles the ordering constraint of TOML: scalar keys must come before table keys in the same section. Arrays of objects are emitted as [[section]] entries, and intermediate empty table headers are suppressed.

Correct key ordering
Scalars always before tables in each section — the ordering required by the TOML spec.
No empty sections
Intermediate table headers with no direct keys are suppressed — [a] is omitted when only [a.b] has content.
[[Array of tables]]
Arrays of objects become [[section]] entries — the idiomatic TOML pattern for repeated configuration blocks.
47 tools, always free
No file size limits, no watermarks, no account. Funded by non-intrusive display advertising only.
Frequently asked questions
How are nested JSON objects converted to TOML?
Nested objects become TOML table headers. {profile: {release: {opt-level: 3}}} becomes [profile.release] with opt-level = 3 underneath. Intermediate sections with no direct scalar keys are omitted to keep the output clean.
How are JSON arrays converted to TOML?
Arrays of scalars (strings, numbers, booleans) become TOML inline arrays: tags = ["admin", "user"]. Arrays of objects become [[array of tables]] entries — each object in the array gets its own [[section]] header with the object's keys below it.
How do I convert JSON to TOML in Python?
pip install tomli-w. Then: import tomli_w, json; data = json.loads(json_str); print(tomli_w.dumps(data)). Note: tomli_w requires all dict keys to be strings and does not support null values — convert nulls to empty strings before encoding.
Is the JSON to TOML converter free?
Yes, completely free. No file size limits, no account required.
Go up