CoreJSON

TOML to JSON

This TOML to JSON converter turns TOML files such as Cargo.toml and application config into standard JSON instantly. Tables and array tables are expanded automatically, dates become ISO strings and integers outside the safe range are flagged. Computation runs locally in your browser and the config never leaves your machine.

Open in the workbench Runs locally · nothing is uploaded

How to use it

  1. 1

    Paste your TOML

    Paste TOML config text; [section] headers, key-value pairs and [[array]] tables are all supported.

  2. 2

    Handle the type hints

    If the input contains an integer literal beyond 2^53, the tool suggests using a string to avoid losing precision.

  3. 3

    Copy the JSON

    Choose the JSON indentation and copy, or use the ⇄ button to convert back to TOML.

  4. 4

    Use it downstream

    Feed the JSON into a tool on this site or into your application code.

Key features

Full table structure restored

Dotted headers such as [server.host] and array tables such as [[products]] are restored accurately into nested objects and arrays of objects.

Safe date handling

TOML date-times have no matching JSON type, so they are uniformly converted to ISO 8601 strings for predictable behaviour.

Big-integer protection

Values beyond the JSON safe integer range (±2^53) are not forced into a lossy number; the tool clearly reports them instead.

Line and column errors

Missing quotes, missing equals signs and invalid values are located by line and column with a clear explanation.

Array tables handled

Each [[products]] block becomes an object in the products array, with its keys as fields.

Local and private

Parsing happens in your browser and the config is not uploaded.

Common errors & troubleshooting

  • ! TOML strings must be quoted: host = localhost is invalid and should be host = "localhost".
  • ! Comments start with # and are not preserved after conversion, since JSON has no comment syntax.
  • ! Tables must be defined after all their key-value pairs; do not interleave the keys of one table inside another [section].
  • ! Array tables are order-preserving, so the element order in the resulting array matches the file.

Frequently asked questions

What does a TOML date become in JSON?

An ISO 8601 string (for example 2026-01-01T00:00:00.000Z). JSON has no date type, and the string form can be read losslessly by any language — parse it into a Date object in your business code when needed.

Why is a large integer reported as an error?

For example 9007199254740993 exceeds the JSON safe integer limit of 2^53-1, so converting it to a JSON number would lose precision. The tool suggests writing it as a string to prevent data errors at the source.

How is an array table like [[products]] converted?

Each [[products]] block becomes an object in the products array, and the key-value pairs inside become that object fields, with the nested structure restored automatically.

Is my config uploaded?

No. Conversion happens locally in your browser.

Related tools