TOML to JSON Converter

Convert TOML to JSON format

Input TOML

Converted JSON

Paste your TOML on the left and the JSON shows up here.

Or drop a file on this box, , or .

What is TOML to JSON Converter?

A TOML file is pleasant to edit by hand, but the moment a script, an HTTP API or jq needs to read it, you want JSON. Drop in the contents of Cargo.toml or pyproject.toml, or a Hugo or Netlify config, and the right panel shows the same data with every table turned into a nested object.

Parsing follows the TOML v1.0.0 specification, so invalid TOML is rejected rather than guessed at. A few mappings are worth knowing: an [[servers]] array of tables becomes a JSON array of objects, a dotted key like a.b.c = 1 becomes nested objects, and a hex literal such as 0xDEADBEEF is written as the decimal 3735928559. TOML also allows inf and nan, which JSON cannot represent, so those come out as null. What you get is plain JSON that anything built on the web platform APIs can read.

Big integers survive the trip. TOML allows full 64-bit integers, and a value like snowflake_id = 1234567890123456789 pushed through a plain JSON.parse round trip comes back as 1234567890123456800. This converter reads such numbers as BigInt and writes the exact digits into the JSON. Dates are the other surprise: JSON has no date type, so an offset datetime like 2026-11-23T09:30:00Z arrives as the string "2026-11-23T09:30:00.000Z", milliseconds added.

How to Use TOML to JSON

Follow these steps to convert TOML to JSON.

1

Paste, Upload, or Load Sample

Paste TOML into the left Input TOML panel, or click Upload to load a .toml file. Click Sample to load example TOML. Example:

[database]
server = "192.168.1.1"
ports = [ 8001, 8001, 8002 ]
connection_max = 5000
enabled = true

Use Clear to start fresh. The JSON updates as you type or paste.

2

View JSON Output

The right Converted JSON panel updates as you type. TOML tables become objects, arrays become arrays, and all values are preserved per the JSON RFC 8259 specification. Invalid TOML will show an error.

3

Download or Copy

Click Download to save the .json file, or Copy to copy to your clipboard.

When You'd Actually Use This

API Development

A deploy script needs one value out of netlify.toml or fly.toml. Convert the file here, then read the field with jq or JSON.parse instead of adding a TOML parser to the script.

Format Migration

Moving a project off TOML config, for example a tool switching to a JSON settings file? Paste the old file, check that every table landed where you expect, and save the JSON as the new starting point.

Web Applications

Browser code reads JSON with no extra dependency, so turning a TOML feature-flag or theme file into JSON lets a web app load it with fetch() and nothing else.

Tool Compatibility

Some tools require JSON format. Convert your TOML data to JSON when working with JSON-based systems or APIs.

Common Questions

Is my TOML data stored?

No. The parsing is done inside this tab and nothing is posted anywhere, so a config with a database password in it is fine to paste.

What TOML formats work?

Anything that is valid TOML 1.0: inline tables, arrays of tables, dotted keys, multi-line basic and literal strings, and all four date and time kinds. When the parser refuses a file, the message names the problem and prints the offending line with a caret under it; set port twice in one table and it points at the second port.

How are TOML tables handled?

A [table] header becomes a JSON object and [[table]] becomes an array of objects. Strings, integers, floats and booleans map straight across. Dates become strings that keep their form and offset, with milliseconds added: dob = 1979-05-27T07:32:00-08:00 comes out as "1979-05-27T07:32:00.000-08:00", while a local date like 1979-05-27 stays "1979-05-27". An array of tables like [[servers]] is the part that reads best in the JSON table viewer on our home page: one row per server.

Can I convert JSON back to TOML?

Yep. Use our JSON to TOML converter to convert JSON files back to TOML format.

What if my TOML has special characters?

Special characters are properly handled in JSON. Strings with quotes or other JSON syntax characters are escaped correctly.

Does it work with large TOML files?

Config files are rarely more than a few hundred lines, and those convert as you type. The parser runs in this tab, so a very large file is limited by your machine rather than by an upload size; a generated TOML file of several megabytes may pause briefly after each edit.

Other TOML Tools You Might Need

Going the other way, or need YAML, XML or CSV out of the same TOML file? Those converters are here: