JSON ⇄ TOML
Converts between JSON and TOML, mapping nested objects onto table headers.
The JSON ⇄ TOML half of the same converter, for the moment a `Cargo.toml`, a `pyproject.toml` or a `netlify.toml` needs to become something a script can read — or the other way round. TOML is stricter than JSON about what a value may be, and the differences show up as warnings rather than surprises.
Input
Drop a .yaml, .json or .toml file
Read in this tab. Nothing is uploaded.
JSON out
Written here rather than pulled from npm, which means the subset is chosen rather than inherited. Anything on this list is refused by name instead of being mis-read.
How to use it
Paste the TOML, or the JSON
Detection distinguishes the two easily — `[section]` headers and bare keys are unambiguous — but the From picker is there when you want to be sure.
Set the target to TOML or JSON
Going to TOML, tables are emitted as `[section]` headers rather than inline tables wherever the shape allows, which is what a hand-edited config looks like.
Check what TOML could not hold
Nulls are dropped, and date-times coming out of TOML become strings because JSON has no date type. Both are listed in the warnings when they happen.
Common questions
Why did my dates turn into strings?
TOML has first-class offset date-times, local dates and local times; JSON has none of them. Carrying the text across is the only lossless-looking option, and the round trip back into TOML will produce a quoted string rather than the original date literal.
Can it convert an array of mixed types?
Into JSON, yes. Into TOML the array is emitted as-is; TOML 1.0 permits heterogeneous arrays, but plenty of TOML readers in the wild — and TOML 0.5 — do not, so a mixed array is worth a second look before you commit it.
Does it catch duplicate keys?
Yes — a key defined twice, or a table redefined, is a TOML error and is reported as one rather than silently taking the last value the way a lenient reader would.
Feed it from
TOML Formatter & Validator
Formats and validates TOML, normalising table ordering and inline-table style.
JSON ⇄ YAML
Converts either way, preserving key order and choosing block or flow style for the YAML side.
JSON Formatter & Validator
Pretty-prints, minifies and validates JSON, pointing at the exact line and column of a syntax error.
YAML Formatter & Validator
Re-indents YAML consistently, validates it, and flags the tab and anchor mistakes that break parsers.
Next
These accept what this tool produces, so the result can go straight in.
JSON Formatter & Validator
Pretty-prints, minifies and validates JSON, pointing at the exact line and column of a syntax error.
JSON ⇄ YAML
Converts either way, preserving key order and choosing block or flow style for the YAML side.
TOML Formatter & Validator
Formats and validates TOML, normalising table ordering and inline-table style.
Base64 Encoder & Decoder
Encodes and decodes Base64 and Base64URL for text or files, handling UTF-8 correctly.
curl to Code
Converts a curl command into fetch, axios, Python requests, Go, PHP or PowerShell.
Text Hash
Computes MD5, SHA-1, SHA-256, SHA-384, SHA-512 and CRC-32 of a string, with an uppercase and Base64 output option.