TOML to JSON

Convert TOML data to JSON format. Supports tables, arrays of tables, inline tables, nested keys, and all scalar types — all in your browser, no upload, instant results.

About the TOML to JSON Converter

This TOML to JSON converter runs entirely in your browser. Paste TOML into the box above and click Convert. The result appears as formatted JSON. Nothing is uploaded to a server — parsing happens instantly with JavaScript on your device.

About the TOML format

TOML (Tom's Obvious, Minimal Language) is a configuration file format designed to be easy to read due to its clear semantics. It uses key-value pairs, tables (denoted by square brackets), and supports comments, arrays, and nested structures.

Parsing rules

  • Tables[table] creates a new section. Nested tables use dotted notation: [a.b.c].
  • Array of tables[[products]] creates an array element. Repeated headers append to the array.
  • Inline tablespoint = { x = 1, y = 2 } creates a single-line table.
  • Strings — Basic strings use double quotes; literal strings use single quotes; multi-line basic strings use triple double quotes.
  • Scalars — Integers, floats, booleans (true/false), and datetimes are recognized.
  • Arrays[1, 2, 3] supports mixed types and trailing commas.
  • Dotted keysa.b.c = 1 creates nested structures inline.
  • Comments — Lines starting with # (or trailing #) are ignored.

Common use cases

  • Converting Cargo config files for use in JavaScript tooling.
  • Transforming TOML configuration into JSON for API consumption.
  • Inspecting TOML structure during development.
  • Migrating configuration files between formats.

Frequently asked questions

Does this tool upload my TOML? No. All parsing happens locally in your browser. Your data never leaves your device.

Are datetime values converted to Date objects? No. To preserve fidelity, datetimes are kept as their original string representation in the JSON output.

What TOML version is supported? The parser covers the core of TOML 1.0 including tables, array of tables, inline tables, multi-line strings, and dotted keys.

Is there a size limit? The only limit is your browser's available memory. Even large TOML files convert quickly.