All Over Tools logo
Tool Combiner
Analyze Tools Clean Tools Compare Tools Convert Tools Data Validation Extract Tools Format Tools Generate Tools Organize Tools Transform Tools
Image Tools Video Tools Audio Tools Subtitle Tools Font Tools
Analyze Tools Clean Tools Compress Tools Convert Tools Edit Tools Extract Tools Generate Tools Merge Tools Organize Tools Redact Tools Repair Tools Split Tools
Analyze Tools Clean Tools Compare Tools Convert Tools Extract Tools Generate Tools Merge Tools Transform Tools Validate Tools
Business Calculators Construction Calculators Date And Time Calculators Education Calculators Financial Calculators Food Calculators Health Calculators Math Calculators Science Calculators Sports Calculators Statistics Calculators
Blog About Us Contact Us

TOML to JSON Converter

Paste or upload a TOML configuration file and convert it into nested JSON. Tables, inline tables, arrays of tables, quoted and dotted keys, booleans, integers, floats, and date/time values are all parsed and preserved in their original hierarchy. Invalid TOML is flagged with a precise line and column. Everything runs locally in your browser.

Drop a TOML file here

or

TOML, TXT

What This Tool Does

Paste TOML text or upload a .toml or .txt file. The browser-based converter turns it into nested JSON and keeps the structures it supports, including tables, inline tables, arrays of tables, dotted keys, and quoted keys. It also reports parse errors with a line and column location.

How to Convert TOML to JSON

  1. Add your TOML: Paste content into Paste TOML content below, or drop/upload a .toml or .txt file.
  2. Choose the format: Set Output format to Pretty (indented) or Compact (minified). For pretty output, choose Indent size: 2 spaces, 4 spaces, or Tab.
  3. Conversion starts automatically when the TOML is usable; change the output settings to refresh the JSON.
  4. Review the result: If parsing succeeds, check the JSON output and any conversion notes. If parsing fails, the error identifies the problem and its line and column.
  5. Use the JSON: Click Copy JSON or Download JSON.
  6. Start over: Click Clear to remove the input, result, workspace, and errors.

How TOML Structures and Values Appear in JSON

[table] and dotted table headers create nested objects. Each [[array.of.tables]] header appends an object to an array. Inline tables such as { cpu = 79.5 } are supported on one line, while dotted keys become nested objects and quoted keys remain literal keys.

The parser handles booleans, decimal, hexadecimal, octal, and binary integers, floats, and arrays. This implementation accepts mixed array values, but that behavior should not be read as a claim about every TOML grammar rule. It also does not declare a formal TOML-version compatibility range.

Dates, Special Floats, and Large Integers

Date-times, dates, and times become tagged objects such as { "$tomlType": "offset-datetime", "value": "1979-05-27T07:32:00-08:00" } because JSON has no native date/time type. inf and nan also become tagged objects. The warning banner lists distinct conversion notes, so repeated identical values may appear in one warning.

Integers are converted to JavaScript Number values. Integers beyond safe JSON precision, 2^53, may lose accuracy and generate a warning. Check those values before relying on the output for exact numeric data.

Parse Errors and Troubleshooting

When the input is invalid, the tool shows the parsing problem with its line and column location. Confirmed examples include unterminated strings, duplicate keys, malformed table headers, and multiline inline tables. The parser reports the error; it does not guess a correction.

Output Options and Limitations

Pretty (indented) output uses 2 spaces, 4 spaces, or Tab. Compact (minified) output removes formatting whitespace. This tool converts only TOML to JSON: it does not edit the original TOML or flatten the resulting structure. A JSON-to-TOML round trip is not guaranteed to be lossless because JSON lacks native date/time types and does not preserve every TOML numeric distinction.

Privacy & Security

File reading, parsing, conversion, and JSON construction happen in your browser. The local workflow does not upload the selected file to a server. Uploaded files longer than 200,000 characters are shortened only in the textarea preview; the full file remains available for processing.

Frequently Asked Questions

Does converting TOML to JSON upload my file anywhere?

No. Parsing your TOML and building the JSON both happen entirely in your browser. Your file never leaves your device.

How are TOML date and time values represented in JSON?

JSON has no native date/time type, so each date or time value is converted into a tagged object like { "$tomlType": "offset-datetime", "value": "1979-05-27T07:32:00-08:00" }. The warning banner lists the distinct conversion notes instead of silently turning these values into plain strings or numbers.

What happens if my TOML is invalid?

The tool shows the exact line and column where parsing failed and names the problem - an unterminated string, a duplicate key, a malformed table header - instead of silently guessing what you meant.

Can I convert the JSON output back to TOML losslessly?

Not with any guarantee. JSON has no distinct types for TOML's dates, times, or integer/float distinction in every case, so converting JSON back to TOML is not a lossless round trip. This tool only converts TOML to JSON, one direction.

Related Tools

18 views