Developer Tools

JSON to TOML

Convert JSON objects to TOML locally, using table sections or inline tables. Retain supported number tokens exactly and get clear errors for nulls, duplicate keys or integers outside TOML’s range.

Your content stays on your device Free, with no account
Convert JSON into readable configuration Local worker · 5-second limit
Up to 200,000 UTF-16 units, 50,000 JSON tokens, 20,000 values and 100 nested containers.

TOML has no null type. Nulls, duplicate keys, non-object roots and integers outside signed 64-bit range are rejected. Quote large numbers in JSON to keep them as text. Date-like JSON strings stay strings.

YOUR TOML

Ready. Paste a JSON object and choose a layout.

Original number tokens are retained within supported ranges. TOML consumers may round floating-point values to binary64. All keys are quoted; arrays of objects use inline tables. Output order can change to keep table scope correct. Empty root objects produce a comment-only document.

A FEW SIMPLE STEPS

How to use JSON to TOML

  1. Paste a JSON object or load the example. Root arrays and primitives are not TOML documents.
  2. Choose table sections for nested objects or inline tables. Arrays of objects always use inline tables.
  3. Select Convert to TOML. Resolve any null, duplicate-key or numeric-range errors; no fields are silently omitted.
  4. Review the output and float warning if present, then copy or download the TOML file. Cancel or edit to stop pending conversion.
PRIVATE BY DESIGN

Why use this tool?

Conversion happens locally in a disposable worker, with no uploads, accounts or saved input history. The shared JSON tokenizer retains source number tokens, while explicit compatibility checks prevent silent omission of unsupported data.

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

A few things worth knowing

Which JSON values can be converted?

The root must be an object. Nested objects, arrays, strings, booleans and supported numbers are converted. TOML has no null type, so null is rejected at any depth with a JSON-style path. Root arrays/primitives, duplicate JSON keys and unpaired surrogate strings are also rejected rather than repaired or omitted.

Are large numbers preserved?

Integer tokens are checked with BigInt and written without Number conversion, within TOML’s signed 64-bit integer range of -9223372036854775808 through 9223372036854775807. Larger integer tokens must be quoted in JSON to retain them as text. Fractional or exponent tokens are also written as authored, but TOML consumers generally interpret floats as binary64 and may round. Obvious float overflow or nonzero underflow to zero is rejected.

How do the layouts differ?

Table layout writes nested object sections with quoted paths, putting assignments before child sections to keep scope correct. Inline layout writes nested objects as inline tables. Arrays of objects use inline tables in both layouts, not double-bracket array-of-table sections. Empty objects remain tables and an empty root produces a comment-only TOML document. Output order may differ from input.

What happens to strings and key names?

All keys are quoted, so dots, spaces, empty names and prototype-like names remain literal data. Strings are decoded from JSON and escaped as TOML basic strings; Unicode scalar values and control characters are handled explicitly. Date-like strings remain quoted strings and are never inferred as dates. Original escape spelling may change.

Does this preserve exact JSON text or validate a schema?

It converts supported data to a TOML 1.0-compatible subset, not the original JSON layout, spelling of string escapes or member order. Number tokens are retained within the documented numeric limits; a TOML reader may interpret their numeric type or precision differently. No JSON Schema, application configuration schema or runtime behavior is checked.

What are the privacy and size limits?

Input is limited to 200,000 UTF-16 units, 50,000 JSON tokens, 20,000 values and 100 nested containers. Output is limited to 1,000,000 units. A five-second deadline includes worker loading; cancel, edits and page exit terminate work and stale replies are ignored. Errors expose no partial output. JSON and TOML remain on your device, and files download as UTF-8 text.