Skip to content

TOML to JSON

Convert standard TOML tables and scalar data to formatted JSON locally.

TOML → JSON83 characters
Paste configuration text. The live preview stays inert and is limited for responsiveness.
JSON previewReady
{
  "title": "Toolbox",
  "enabled": true,
  "ports": [
    3000,
    3001
  ],
  "server": {
    "host": "localhost"
  }
}
Processed on your device

How it works & useful details

Supported TOML

Imports bare/basic keys, regular [table] headings, quoted strings, booleans, finite safe numbers, date-like values and scalar arrays. Table paths form nested JSON objects.

Inline tables, array tables, multiline strings and dotted assignment keys are rejected rather than approximated. TOML dates remain strings because JSON has no date type.

Private, bounded processing

This workspace parses text only in your browser. It never opens links, requests external entities, runs pasted configuration, or saves your document. Input is limited to 500,000 characters; conversion output is limited to 1,000,000 characters.

About this tool

TOML to JSON converts standard TOML tables, arrays, and scalar values into formatted JSON. It is handy when a Rust, Python, or Cargo-style configuration file needs to be consumed by tooling that only reads JSON.

The parser handles the common TOML data model, including nested tables and inline values, and reports anything outside its supported subset. Conversion is local and does not fetch referenced files.

How to use it

  1. Paste the TOML document.
  2. Convert to see tables and keys mapped into JSON objects.
  3. Review the warnings for values or syntax the converter did not support.
  4. Copy the JSON or download it as a file.

Worked example

title = "Toolbox"
enabled = true
released = 2026-09-24
ports = [3000, 3001]

[server]
host = "localhost"
port = 8080

converts to

{
  "title": "Toolbox",
  "enabled": true,
  "released": "2026-09-24",
  "ports": [3000, 3001],
  "server": { "host": "localhost", "port": 8080 }
}

Booleans and numbers keep their types. The date becomes a string, because JSON has no date type.

Supported TOML and why some features are refused

TOML is used by Cargo.toml (Rust), pyproject.toml (Python), Hugo, Netlify, and Cloudflare's wrangler.toml. This converter handles the common core: key/value pairs, [table] sections that become nested objects, strings, booleans, numbers, dates, and arrays of simple values.

Inline tables ({ a = 1 }), arrays of tables ([[bin]]), multi-line strings, and dotted keys (server.port = 8080) are rejected with a clear message instead of being approximated. A partial conversion that silently dropped part of a configuration would be worse than no conversion. Numbers outside JavaScript's safe integer range are rejected as well, rather than rounded.

Frequently asked questions

Are dates and times preserved?

TOML date and time values are represented explicitly in the output rather than being silently reformatted.

What about multi-line strings and literal strings?

Common string forms are parsed; anything unsupported is reported so you can adjust the source.

What is the limit?

Up to 500,000 characters of TOML input.

Can I convert pyproject.toml?

Simple files work. Many pyproject.toml files use inline tables (for example, authors = [{ name = "…" }]), which this converter does not support yet.