TOML to JSON Converter

Convert TOML to JSON online. Paste a Cargo.toml, pyproject.toml, or config file and get clean JSON instantly — handles tables, array-of-tables, and inline collections, all in your browser.

Input TOML
Drop TOML file here
JSON Output

Features

âš™ī¸ Full Structural Support

  • Dotted and nested [tables]
  • [[array-of-tables]] for repeated entries
  • Inline tables and inline arrays
  • Typed values: strings, ints, floats, booleans, dates

⚡ Privacy-First

  • All parsing happens in your browser
  • No data ever sent to a server
  • Multi-line arrays and inline tables supported
  • Download or copy the resulting JSON instantly

🔄 Round-Trip Friendly

  • Pairs with our JSON to TOML converter
  • Great for Cargo.toml, pyproject.toml, Hugo configs
  • Inspect a TOML file's structure as plain JSON
  • Feed the JSON output into any JSON tool or validator

TOML to JSON Guide

TOML powers configuration for Rust's Cargo, modern Python packaging (pyproject.toml), and the Hugo static site generator. Its unambiguous grammar makes it easy to convert to JSON for tooling that only understands JSON — schema validators, diffing tools, or scripts that need to read config values programmatically.

Frequently Asked Questions

How are [[array-of-tables]] handled?

Each [[name]] header appends a new object to a JSON array under that key — this is TOML's way of expressing a list of tables, common for dependency lists or repeated config blocks.

Are dotted keys supported?

Yes — both dotted table headers ([profile.release]) and dotted inline keys (a.b.c = 1) create the correct nested JSON structure automatically.

What happens to dates and times?

TOML's native date/time types are preserved as ISO 8601 strings in the JSON output, since JSON has no native date type.

When to convert TOML to JSON

TOML is designed for humans to edit: Cargo.toml, pyproject.toml, Hugo and Netlify configs all use it. JSON is what most programs and APIs consume. Converting lets you inspect a TOML file as plain data, feed it to a JSON tool, or validate it with a JSON Schema.

Tips and common pitfalls

  • A [table] header becomes a nested object and [[array.of.tables]] becomes an array of objects.
  • TOML has native date and time types, while JSON does not, so they come out as strings in ISO 8601 form.
  • TOML integers are 64-bit. JavaScript numbers lose precision above 253, so very large integers may not survive a round trip.
  • Validate the converted JSON against a schema, for example the published schemas for pyproject.toml and Cargo manifests.

More questions

Why does my TOML fail to parse?

Common causes are defining the same key twice, redefining a table, mixing a key and a table with the same name, or forgetting quotes around strings. TOML strings always need quotes, unlike YAML.

Is TOML better than YAML for config?

TOML is simpler and has fewer surprises because indentation has no meaning and types are explicit. YAML is more compact for deeply nested data. Both convert cleanly to JSON.