TOML to JSON Converter
This tool converts TOML (Tom's Obvious Minimal Language) configuration into JSON
This tool converts TOML (Tom's Obvious Minimal Language) configuration into JSON
How to use TOML to JSON Converter
- Paste or type your TOML into the input box.
- Choose the JSON indent style (2 spaces, 4 spaces, tab, or minified).
- Click Copy JSON or Download .json to save the converted output.
About TOML to JSON Converter
This tool converts TOML (Tom's Obvious Minimal Language) configuration into JSON. Paste your TOML and it parses in real time, producing clean, indented JSON you can copy or download as a .json file. It understands the common parts of the TOML 1.0 spec: comments, bare, quoted and dotted keys, [table] and [[array of tables]] headers, basic and literal strings (including multi-line """ and ''' forms), integers in decimal, hex, octal and binary with underscore separators, floats with exponents and inf/nan, booleans, inline arrays and inline tables.
Because JSON has no native date type, TOML dates and times (offset date-times, local date-times, local dates and local times) are kept as strings so no information is lost. Special float values inf and nan are emitted as the strings "inf", "-inf" and "nan" to keep the output valid JSON. Very large integers beyond JavaScript's safe range are preserved as strings rather than losing precision.
Everything runs privately in your browser using a self-contained parser — nothing is uploaded to a server, and there is no sign-up. This is a converter, not a validator, so it aims to handle real-world config files rather than exhaustively enforce every spec rule; if something does not parse, it shows a clear error with the line number.
Frequently asked questions
- How do I convert TOML to JSON?
- Paste or type your TOML into the input box. The JSON appears automatically below as you type. Pick your preferred indent (2 spaces, 4 spaces, tab, or minified), then click Copy JSON or Download .json.
- Is my data private?
- Yes. The conversion happens entirely in your browser with a built-in parser. Your TOML is never uploaded or sent to any server, and no sign-up is required.
- What TOML features are supported?
- Tables, arrays of tables ([[...]]), inline tables, dotted keys, basic and literal strings including multi-line """ and ''' forms, integers in decimal/hex/octal/binary with underscore separators, floats with exponents plus inf and nan, booleans, and dates. It targets the common parts of the TOML 1.0 spec.
- Why are dates shown as strings?
- JSON has no date or time type, so TOML date-times, dates and times are emitted as strings to preserve them exactly. You can parse those strings into real dates in your own code after conversion.
- What happens with invalid TOML?
- The tool shows a clear error message, usually with the line number, so you can find and fix the problem. Nothing is converted until the input parses cleanly.
- How are very large numbers and inf/nan handled?
- Integers larger than JavaScript can represent safely are kept as strings to avoid losing precision. The special float values inf, -inf and nan are written as strings so the JSON stays valid.