TOML to JSON Converter
Paste a TOML config and get clean JSON instantly, with duplicate-key detection and errors that point at the line.
Converted to JSON live as you type. Nothing leaves your browser.
Indentation
Dates and times
JSON
How to convert TOML to JSON online
Paste your TOML
Drop a TOML document into the input and the JSON appears live as you type, with any parse error shown at the line where it occurs.
Choose the format
Pick 2 spaces, 4 spaces, or minified output, and decide whether dates become plain strings or typed objects.
Copy or download the JSON
Use Copy JSON to take the result to your editor, or Download .json to save it straight to disk.
Why use this tool
A real TOML parser
Tables, arrays of tables, inline tables, dotted keys, basic and literal strings, multi-line strings, numbers, and booleans all convert to their JSON equivalents.
Errors with line numbers
Invalid input shows the parse error together with the line and column where it failed, and clears the moment the document becomes valid again.
Duplicate keys are caught
Defining the same key or table twice is reported instead of silently overwriting, which is easy to miss by eye in a long config file.
Dates your way
Offset date-times, local date-times, dates, and times can stay as ISO 8601 strings or become typed objects that record which kind they were.
Indented or minified output
2 spaces, 4 spaces, or a single minified line with no whitespace, ready for a file, a request body, or a compact payload.
Configs stay on your machine
Everything runs in your browser, so config files that carry hostnames, tokens, or secrets are never uploaded.
About this tool
This tool converts TOML to JSON in your browser. Paste a TOML document and the JSON equivalent appears as you type, indented with 2 or 4 spaces or minified to a single line. A hand-written parser reads the full grammar: tables and arrays of tables become nested objects and arrays, inline tables become objects, dotted keys expand into nested structure, and basic, literal, and multi-line strings are unescaped correctly. Numbers in decimal, hexadecimal, octal, and binary are recognised, along with booleans and the four date and time shapes that TOML defines.
TOML is the config format behind many build tools and package manifests, and the tooling around those files usually speaks JSON instead. Converting is the quickest way to feed a config into a validator, an API, or a script, or simply to see what a tricky block actually parses to. When the input is malformed, the inline error names the line and column where parsing stopped, and defining the same key or table twice is reported rather than silently merged. Dates can stay as ISO 8601 strings or become typed objects when a consumer needs to know a value was a date and not just text.
Config files are a poor fit for converters that upload your input, since they routinely hold internal hostnames, tokens, and secrets. Here nothing leaves your browser. After converting, the JSON formatter can restyle or validate the result, and for other formats you can reach for the YAML to JSON converter or send JSON the other way with the JSON to YAML converter.
Frequently asked questions
- What parts of TOML are supported?
- Tables, arrays of tables, inline tables, and dotted keys all convert to nested JSON. Basic, literal, and multi-line strings are handled, along with integers in decimal, hex, octal, and binary, floats, booleans, and offset date-times, local date-times, dates, and times.
- How are TOML dates turned into JSON?
- JSON has no date type, so you choose. By default a date or time becomes an ISO 8601 string. Switch to typed objects and each becomes a { type, value } pair that records whether it was an offset date-time, a local date-time, a date, or a time.
- Does it catch duplicate keys?
- Yes. Assigning the same key twice, or defining the same table header more than once, is reported as an error with the offending key, instead of quietly keeping the last value.
- Is my TOML uploaded anywhere?
- No. The conversion runs entirely in your browser. Nothing is sent to a server, stored, or logged, which matters for config files that carry credentials or internal hostnames.
- Why does my TOML show an error?
- The document has a syntax problem such as a missing bracket, an unterminated string, a duplicate key, or a value that is not valid. The inline message reports the line and column where parsing stopped so you can go straight to it.
- Can I get minified JSON?
- Yes. Choose Minified next to the output and the JSON collapses to a single line with no extra whitespace, which is handy for a query parameter or a compact request body.
Related tools
JSON Formatter & Validator
Pretty-print, minify, or explore JSON as a collapsible tree, with syntax errors shown inline.
YAML to JSON
Paste YAML and get JSON instantly, indented or minified, with parse errors that point at the line.
JSON to YAML
Convert JSON to YAML and YAML back to JSON, in both directions, with your choice of indentation.
Angle Converter
Convert an angle between degrees, radians, gradians, turns, arcminutes and arcseconds, with a degrees-minutes-seconds breakdown.
Area Converter
Convert area between metric and imperial units instantly.
Binary to Decimal Converter
Convert a binary number to its decimal value, with hexadecimal and octal readouts.