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
Audio Tools Font Tools Image Tools Subtitle Tools Video Tools
Archive Tools Document Tools Ebook Tools File Management Tools PDF Tools Presentation Tools
Config Tools Database Tools Dataset Tools JSON Tools Parser Tools Spreadsheet Tools XML 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

Use pasted TOML or a file

Paste TOML into the text area or load a .toml or .txt file. The converter keeps tables, inline tables, arrays of tables, dotted keys, and quoted keys in the resulting JSON structure. It reports parse errors with a line and column, and marks date and time values with their TOML type.

  1. Paste TOML into the text area, click browse files to choose a .toml or .txt file, or drop it on Drop a TOML file here.
  2. Choose Output format. Pretty (indented) keeps line breaks; Compact (minified) removes formatting whitespace.
  3. For pretty output, set Indent size to 2 spaces, 4 spaces, or Tab.
  4. Read JSON output and the conversion notes. The converter processes valid input automatically and shows a line and column for a parse error.
  5. Click Copy JSON or Download JSON to take the result to another file or tool.
  6. Click Clear to remove the input, output, options, and error message.

What TOML structure becomes

A table header such as [user] creates an object. An array-of-tables header such as [[servers]] adds objects to an array. Dotted keys create nested properties, quoted keys stay literal, and inline tables must stay on one line.

[user]
name = "Alice"

With Compact (minified) selected, the sample becomes:

{"user":{"name":"Alice"}}

The parser reads booleans, decimal, hexadecimal, octal, and binary integers, floats, strings, and arrays. Arrays may contain mixed value types.

How special TOML values appear in JSON

Date-times, dates, and times become tagged objects because JSON has no native date/time type. For example, 1979-05-27T07:32:00-08:00 becomes { "$tomlType": "offset-datetime", "value": "1979-05-27T07:32:00-08:00" }. The warning banner lists each distinct conversion note. inf and nan also become tagged float objects.

Integers become JavaScript Number values. An integer beyond safe JSON precision, 2^53, may lose accuracy and produces a warning. Check those values before relying on exact integers in the output.

What a TOML parse error shows

An invalid value keeps JSON output hidden and displays the parser message with a line and column. The parser reports issues such as unterminated strings, duplicate keys, malformed table headers, and inline tables that span multiple lines. You must correct the TOML before JSON output appears.

What happens with a large uploaded file

When a selected file is longer than 200,000 characters, the text area shows a shortened preview with a truncation note. The full file is still processed. File reading, parsing, and JSON construction happen in the browser, and the page does not send the file contents in a network request.

The result can be copied with Copy JSON or saved with Download JSON. The download uses the filename converted.json.

Choose another config converter

Use the Config File Convert Tools category for another configuration conversion. For YAML input, use the YAML to JSON Converter.

Frequently asked questions

Can I convert a TOML file to JSON?

Yes. Click browse files or drop a file on Drop a TOML file here. The accepted file types are .toml and .txt.

How do I format TOML to JSON with two spaces?

Choose Pretty (indented) under Output format, then choose 2 spaces under Indent size. JSON output refreshes when the setting changes.

How does TOML to JSON handle dates and times?

Each date or time becomes a tagged object containing its TOML type and original value. A conversion note appears above JSON output.

Where does the TOML parser show an error?

The parser message includes the line and column where the problem was found. JSON output stays hidden until the input parses successfully.

Related Tools

52 views