Developer Tools

TOML to JSON

Convert TOML tables, arrays and settings to JSON locally. Write integers exactly, choose indentation, and explicitly opt in to normalized date/time strings. No uploads or accounts.

Your content stays on your device Free, with no account
Turn configuration into JSON Local worker · 5-second limit
Up to 100,000 UTF-16 units, 20,000 parsed values and 100 nested tables/arrays. Empty or comment-only TOML becomes {}.

Off by default: JSON has no date/time type. If enabled, temporal fractions beyond milliseconds may be truncated. Floating-point values use JavaScript binary64 and can round or underflow; original numeric spelling and comments are not preserved.

YOUR JSON

Ready. Paste TOML and choose your output options.

Integers are written as exact JSON number tokens, including large values. A JSON consumer may still round large numbers. Non-finite values are rejected. Comments, original key order and TOML formatting are not retained. Input is never executed or uploaded.

A FEW SIMPLE STEPS

How to use TOML to JSON

  1. Paste TOML configuration or load the example. Choose spaces, tabs or minified JSON.
  2. Leave date/time conversion off for strict type handling, or explicitly enable normalized date/time strings with millisecond precision.
  3. Select Convert to JSON and review any precision or type-conversion warnings. Cancel or edit to stop pending work.
  4. Copy or download JSON. Large integers are exact in the file, but downstream JSON software may still round them.
PRIVATE BY DESIGN

Why use this tool?

Conversion runs on your device in a disposable worker using a self-hosted TOML parser. No API, upload, account or saved input history is involved. Date/time handling is explicit and processing can be canceled without changing your source.

Tool inputs stay in your browser. Only your theme preference is saved on this device.

A few things worth knowing

Which TOML parser is used?

The tool uses self-hosted smol-toml 1.9.1 with its BSD-3-Clause license retained. It targets TOML 1.1 syntax, including tables, dotted keys, arrays of tables, multiline strings and inline tables. Runtime dependencies come from this website, not a CDN. This is a data conversion, not a configuration-schema validator.

Are integers preserved exactly?

The parser reads integers as BigInt and the converter writes their decimal digits directly as JSON number tokens. This includes values outside JavaScript’s safe integer range. Other software may round those tokens when reading JSON; a warning appears when large integers occur. Original base notation, underscores and signed-zero integer spelling are not retained.

What happens to floating-point values?

TOML floats use JavaScript binary64 numbers. Decimal precision, spelling and exponent notation can change, and very small values can underflow to zero. Output contains the parsed numeric value, not the original numeric token. Non-finite values such as inf and nan, including float overflow to infinity, are rejected because JSON has no representation. Quote a value in TOML to preserve its text spelling instead.

How are dates and times handled?

They are rejected by default because JSON has no native date/time type. You can quote them in TOML to keep their exact text, or opt in to normalized JSON strings. Opt-in output uses the parser’s legacy TomlDate representation at millisecond precision, and finer fractions may be truncated. Local date/time strings retain their local form without adding a timezone; offset datetime strings retain an offset. Normalization may alter spelling, fractional digits and delimiters.

What is lost during conversion?

Comments, blank lines, original key order, numeric bases and presentation styles are not retained. Tables become JSON objects and arrays of tables become arrays of objects. Empty or comment-only TOML is valid and becomes {}. Duplicate keys and invalid TOML are rejected. Potentially prototype-like names remain own data properties and are never merged into application objects.

What are the limits and privacy behavior?

Input is limited to 100,000 UTF-16 units, traversal to 20,000 values and 100 nested tables/arrays, and output to 1,000,000 units. A five-second deadline includes module loading and parsing. Cancel, edits and page exit terminate the worker and stale replies are ignored. Errors produce no partial exports. Input is not stored or executed. Line endings normalize to LF and raw unpaired surrogates are rejected.