TOML to JSON Converter
Convert TOML to JSON online. Parses TOML v1.0 tables, arrays of tables, dotted keys, dates and multi-line strings entirely inside your browser.
What is the TOML to JSON Converter?
The ByteTools TOML to JSON Converter reads a TOML v1. 0 document and returns the equivalent JSON tree.
- Full TOML v1.0 tables, arrays of tables and dotted keys
- Multi-line basic and literal strings with escape handling
- Integers with _ separators and 0x, 0o and 0b prefixes
- Rejects duplicate keys and re-defined tables with line and column
- Dates and inf/nan emitted as strings so the JSON stays valid
- Runs completely in your browser — no upload
How to use the TOML to JSON Converter
- 1
Paste your TOML into the input box, or drop a .toml file onto the drop zone.
- 2
Leave 'Pretty-print with 2-space indent' ticked for readable JSON, or untick it for a compact line.
- 3
Click Convert to JSON.
- 4
Review the key count, then Copy the JSON or Download it as a .json file.
About the TOML to JSON Converter
The ByteTools TOML to JSON Converter reads a TOML v1.0 document and returns the equivalent JSON tree. It handles [table] and [[array of tables]] headers, dotted keys, basic and literal strings, triple-quoted multi-line strings with line-ending backslash continuation, integers with underscore separators and 0x/0o/0b prefixes, floats, booleans, dates and inline tables and arrays.
It is aimed at anyone working with Cargo.toml, pyproject.toml, netlify.toml or a Hugo config who needs the same data in JSON to feed a script or an API. Duplicate keys and tables defined twice are rejected with the exact line and column, rather than being quietly merged.
Parsing happens 100% locally in your browser. Your TOML is never uploaded or stored, so build configuration, package manifests and private tooling settings never leave your machine.
Frequently asked questions
How do I convert a Cargo.toml or pyproject.toml file to JSON?
Drop the file onto the drop zone or paste its contents, then click Convert to JSON. Tables become nested objects, [[array of tables]] blocks become arrays of objects, and the result is ready to copy or download.
What happens to TOML dates and times in the JSON?
They are emitted as strings in their original format, because JSON has no date type. An offset date-time like 1979-05-27T07:32:00Z stays exactly that text, which every JSON date library can parse back.
Why does my file with a = 007 fail?
TOML forbids leading zeros on integers, so 007 is invalid. Write it as 7, or quote it as "007" if the leading zeros are meaningful — the converter follows the spec rather than guessing.
Does it detect duplicate tables?
Yes. Defining [server] twice, or assigning the same key twice inside one table, is reported as an error with the exact line and column, because TOML treats both as invalid rather than a merge.
Is my TOML uploaded to a server?
No. The parser runs entirely in your browser with JavaScript and nothing is transmitted or stored, which makes it safe for private build settings and package manifests.
Related tools
JSON to TOML Converter
Convert JSON to TOML online. Emits scalar keys first, then [table] headers and [[array]] blocks in the order TOML requires — 100% in-browser.
YAML to JSON Converter
Convert YAML to JSON online in your browser. Handles block scalars, flow collections, anchors and multi-document files — nothing is uploaded.
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.
JSON to YAML Converter
Convert JSON to clean block-style YAML online. Choose the indent width, sort keys, and keep numeric strings quoted — all inside your browser.
YAML Validator
Validate YAML online and catch the errors that break CI: tabs, bad indentation, duplicate keys, missing spaces after a colon and unclosed quotes.