Skip to content
T
Tools.Town
Free Online Tools for Everyone
Product Updates

TOML to JSON

Introducing the TOML to JSON Converter — Parse TOML v1.0 in Your Browser

Convert TOML configuration files to JSON instantly — no libraries, no server, full TOML v1.0 support including arrays of tables, RFC 3339 dates, and all integer bases.

Tools.Town Team 25 June 2026 3 min read

Configuration files written in TOML are everywhere — Rust projects use Cargo.toml, Python packages use pyproject.toml, and dozens of developer tools use TOML by default. But JSON-only APIs, log pipelines, and debugging tools frequently need that data in JSON form. The new TOML to JSON converter translates any TOML document to formatted JSON directly in your browser, with no server round-trip and no library dependencies.

What it does

  • Full TOML v1.0 parser written from scratch — no third-party parsing libraries. The parser was hand-rolled to handle the complete specification.
  • All string types: basic strings (with escape sequences), literal strings (single-quoted, no escaping), multi-line basic strings (triple double-quotes), and multi-line literal strings (triple single-quotes).
  • All integer bases: decimal, hexadecimal (0x), octal (0o), and binary (0b), with underscore separators supported throughout.
  • Full float support: standard notation, scientific notation (e/E), and the special values inf, +inf, -inf, and nan.
  • RFC 3339 datetimes: offset datetime, local datetime, local date, and local time — all four TOML datetime types are parsed and represented in JSON output as ISO 8601 strings.
  • All table types: standard [tables], nested tables, [[arrays-of-tables]], and inline tables { key = "value" }.
  • Dotted keys: server.host = "localhost" and its equivalent [server] block form both produce the same JSON.
  • Optional key sorting: toggle alphabetical sorting of all keys in the output for easier diffs and comparisons.
  • Configurable JSON indent: choose 0 (minified), 2 spaces, or 4 spaces for the output indentation.

Use cases

The converter is particularly useful when working with Cargo.toml files — Rust’s package manifest format. Pasting a Cargo.toml into the converter immediately shows you the exact data structure Cargo is reading, which is invaluable when debugging dependency resolution or build configuration issues. The [[bin]] and [[example]] arrays-of-tables map to JSON arrays you can immediately scan.

Config migration is another common use: if you are moving an application from TOML-based configuration to a JSON-based secrets manager or environment configuration system, the converter produces the target structure in one step. The key-sorting option is particularly helpful here — sorted JSON output diffs cleanly against an existing JSON file.

Debugging pyproject.toml is increasingly common as Python packaging has standardised on TOML. The converter shows exactly how tools like pip, setuptools, and poetry interpret the file’s build system table, dependencies, and optional dependency groups.

Try it

Open the TOML to JSON converter, paste any TOML — a Cargo.toml, a pyproject.toml, or any configuration file — and see the JSON output immediately. To understand the TOML format in depth, including the full syntax reference and how to use TOML in Python, Go, and JavaScript, read the TOML format guide.

Frequently Asked Questions

Does it support the full TOML v1.0 specification?
Yes — the parser handles all TOML v1.0 features: all string types, all numeric bases, RFC 3339 datetimes, arrays of tables, inline tables, and dotted keys.
Is my TOML data sent to a server?
No. The parser runs entirely in your browser using JavaScript. Your configuration data never leaves your machine.
Can I sort keys in the JSON output?
Yes — the converter includes an optional key-sorting toggle that alphabetically sorts all keys in the JSON output, making it easier to compare or diff documents.

Explore more on Tools.Town Blog

Finance guides, tool launches, and engineering stories — updated weekly.

All Posts