Skip to main content
Developer Tools · Free

JSON to TOML Converter

Convert JSON to TOML online — paste JSON or upload a .json file and get clean, syntax-highlighted TOML config instantly. This free JSON to TOML converter maps objects to [tables], nested objects to [dotted.tables], arrays of objects to [[arrays of tables]], handles JSON null honestly (TOML has no null), and detects ISO-8601 dates. 100% client-side: your config never leaves your browser.

Null handling
Mixed-type arrays
Integers beyond int64
Output style
Key order
Date detection
Waiting for input

    How to convert JSON to TOML

    1. Paste or upload. Paste JSON into the input panel, upload a .json file, or load a built-in example — a Cargo.toml-style config, a pyproject.toml-style config, or an edge-case demo.
    2. Converted instantly. The JSON to TOML converter validates your JSON and renders TOML live — objects become [tables], nested objects become [dotted.tables], arrays of objects become [[arrays of tables]].
    3. Tune the mapping. Choose how JSON null is handled (TOML has no null), toggle ISO-8601 date detection, decide what happens to mixed-type arrays and integers beyond the int64 range, and sort keys A–Z for diff-friendly output.
    4. Copy or download. Copy the TOML to your clipboard or download it as a .toml file, ready for Cargo, pyproject, Hugo, or any TOML-based tooling. Nothing is ever uploaded — conversion is 100% client-side.

    JSON → TOML type mapping

    Every JSON value maps to TOML v1.0 as follows. The notes panel under the output reports exactly which conversions were applied to your document — nothing is silently dropped.

    JSONBecomes TOMLNotes
    { object }[table]Nested objects become [dotted.tables]
    Array of objects[[array of tables]]One [[block]] per element
    Array of scalarsInline arrayports = [8001, 8002] — elements must share one type
    String"string" or date/timeValid ISO-8601 strings become TOML datetimes when detection is on
    Number (integer)IntegerRaw digits preserved verbatim; int64 range enforced
    Number (float)FloatRaw token kept (1e3, 1.50); overflow is an error
    Booleantrue / false—
    nullOmitted / "" / errorYour choice — TOML has no null type

    What this JSON to TOML converter handles

    • Live JSON to TOML conversion. Output updates as you type, with a manual Convert button and Ctrl/⌘+Enter shortcut — convert JSON to TOML config without waiting.
    • Honest null handling. TOML v1.0 has no null, so you choose: omit the key (default), write an empty string, or report an error. Every omission is counted in the notes panel.
    • ISO-8601 date detection. Date-like strings become real TOML date/time values — offset date-time, local date-time, local date, and local time — with invalid lookalikes safely left as strings.
    • Strict TOML v1.0 output. Scalar keys are written before sub-tables, each table is defined exactly once, and keys that need quoting ("backup at", "c.d") are quoted automatically.
    • Mixed-type array & big-int guards. Mixed arrays are rejected (or stringified, your choice); integers beyond int64 become strings with a note instead of silently losing precision.
    • JSON validation with line numbers. Paste any document to validate JSON: syntax errors are reported with exact line and column, and duplicate keys are flagged.
    • Cargo, pyproject & Hugo ready. Built-in examples generate Cargo.toml-style, pyproject.toml-style, and app-config TOML — download the result as a .toml file.
    • Private by design. Zero network requests — free JSON to TOML conversion happens 100% client-side: parse, convert, highlight, copy, and download all run locally in your browser.

    Related developer tools

    JSON to TOML — frequently asked questions

    How do I convert JSON to TOML online?

    Paste your JSON into the input panel — or upload a .json file, or load one of the built-in examples. The TOML output renders live on the right: objects become [tables], nested objects become [parent.child] tables, and arrays of objects become [[arrays of tables]]. Then copy the result or download it as a .toml file. This JSON to TOML converter runs entirely in your browser.

    Why can't JSON null be converted to TOML directly?

    TOML v1.0 defines ten value types and none of them is null — an unset setting is simply a key that is not written, and there is no way to store null inside an array either. Rather than dropping nulls silently, this converter lets you choose: omit the key (the default, matching how TOML expresses unset values), write an empty string so the key stays present, or report an error so you can fix the source data before the config ships.

    How are nested JSON objects and arrays mapped to TOML?

    Nested objects become [dotted.table] sections — {"server": {"limits": {"rate": 100}}} becomes [server.limits] with rate = 100. Arrays of objects become [[arrays of tables]], one [[block]] per element. Plain arrays become inline arrays like ports = [8001, 8002]. Scalar key/value pairs are always written before sub-tables, so the output is valid TOML v1.0.

    Do ISO-8601 date strings become TOML dates?

    Yes, when date detection is on (the default). Strings that are valid ISO-8601 dates — 2026-10-09, 20:00:00, 2026-10-09T20:00:00+07:00 — are emitted as TOML date/time values instead of quoted strings, covering all four TOML datetime types: offset date-time, local date-time, local date, and local time. Invalid lookalikes such as 2026-13-45 stay quoted strings. Turn detection off if you want every string kept verbatim.

    What happens to mixed-type arrays and huge integers?

    TOML arrays require every element to have the same type, so [1, "x"] is rejected by default with a clear error — or switch mixed arrays to "stringify" mode to emit ["1", "x"]. Integers and floats may be mixed: 1 becomes 1.0 with a note. Integers beyond the TOML int64 range are written as strings by default (with a note), or reported as errors in strict mode. Raw digit sequences are preserved, so 9223372036854775807 stays exact.

    Why are some keys quoted in the TOML output?

    TOML bare keys may only contain ASCII letters, digits, dashes, and underscores. Any other key — "backup at", "c.d", or a unicode key — is automatically emitted as a quoted key, which is exactly what the TOML specification requires. The meaning is unchanged; only the quoting differs.

    Can I convert TOML back to JSON with this tool?

    No — this is a one-way JSON to TOML converter by design, so the mapping stays predictable. For the reverse direction, use our TOML to JSON converter, which parses TOML v1.0 back into JSON.

    Is my JSON data uploaded to a server?

    No. Conversion runs 100% client-side in JavaScript — your JSON never leaves your browser, is never uploaded, and is never stored. It is safe to convert config files that contain secrets, API keys, or database credentials.

    Note: this is a one-way JSON to TOML converter. For the reverse direction, use the TOML to JSON converter. Only generic TOML v1.0 syntax is produced; format-specific required fields (such as Cargo package metadata rules) are not checked.

    Free tool by NRTechStudio