Skip to main content

Free TOML to JSON Converter Online

TOML to JSON Converter converts TOML v1.0.0 to JSON and JSON back to TOML online for free. Supports tables, nested tables, arrays of tables, inline tables, datetimes, and comments.

Written & reviewed by Helperzy Editorial Team · Updated July 2026

TOML Input

JSON Output

{
  "title": "TOML Example",
  "owner": {
    "name": "Tom",
    "dob": "1979-05-27T07:32:00Z"
  },
  "database": {
    "ports": [
      8001,
      8002
    ],
    "enabled": true,
    "point": {
      "x": 1,
      "y": 2
    }
  },
  "products": [
    {
      "name": "Hammer",
      "sku": 738594937
    },
    {
      "name": "Nail",
      "sku": 284758393
    }
  ]
}

Supported TOML subset (v1.0.0)

  • Key/value pairs & dotted keys
  • [table] and [nested.table]
  • [[array of tables]]
  • Basic "..." & literal '...' strings
  • Multi-line """...""" / '''...'''
  • Integers (with _), floats, booleans
  • Date-times (kept as strings)
  • Arrays (multi-line + trailing commas)
  • Inline tables { a = 1, b = 2 }
  • # comments (full-line & trailing)

100% Private

All conversion runs locally in your browser. Nothing is uploaded.

How to Use TOML to JSON Converter

1

Paste Your TOML

Copy your TOML configuration, including tables, arrays of tables, inline tables, and comments, and paste it into the input area. The parser reads it against the TOML v1.0.0 specification exactly the way a compliant loader would.

2

View the JSON Output

The equivalent JSON appears instantly with types preserved, arrays of tables grouped correctly, and comments removed. Switch the direction if you want to convert a JSON object back into idiomatic TOML instead.

3

Copy or Download

Copy the converted result to your clipboard with a single click or download it as a file. Because the conversion runs locally in your browser, any secrets or paths inside the configuration never leave your device.

Convert TOML to JSON and Back with Full Table Support

TOML, short for Tom's Obvious Minimal Language, has become the configuration format of choice for tools like Cargo, Poetry, and countless CLI utilities because it reads cleanly and maps directly onto a hash table. JSON, meanwhile, is the lingua franca of APIs and JavaScript tooling. Moving between the two by hand is tedious and error-prone, especially once a file uses nested tables or arrays of tables. This converter reads the TOML v1.0.0 subset that real configuration files use and produces the equivalent JSON, and it runs the conversion in reverse so you can turn a JSON object back into idiomatic TOML. All of the work happens in your browser, so a private configuration file with tokens or paths never leaves your device. The parser understands the constructs that appear in production TOML. A bare key-value pair such as a title assigned a quoted string becomes a top-level property in the JSON object. A table header in square brackets opens a nested object, and a dotted table header creates the corresponding nested structure, so a header written as a parent dot child produces an object inside an object. The double-bracket array-of-tables header is the construct that trips up naive converters: each occurrence appends another element to a JSON array under that key, so two consecutive product blocks become an array containing two objects. Values are typed the way TOML specifies rather than flattened to strings — integers and floats become JSON numbers, true and false become JSON booleans, offset and local datetimes are preserved as strings in their original notation, and both multi-line and single-line arrays become JSON arrays. Inline tables written in curly braces become nested JSON objects on a single line, and any line or trailing segment beginning with a hash is treated as a comment and dropped from the output. A concrete example shows the mapping clearly. Start with the single line where title is assigned the quoted string TOML Example. The converter emits a JSON object with one property, title, whose value is the string TOML Example. Now add two array-of-tables blocks, each headed by double-bracketed products, the first giving a name and an id and the second giving a different name and id. Because the double-bracket header means append, the converter groups both blocks under a single products key and produces an array holding two objects, each carrying its own name and id. This is exactly the behavior a TOML-aware program expects, and it is the detail that a simple line-by-line translation gets wrong by overwriting the first block with the second. Switch the direction and paste that JSON back in, and the tool regenerates the two double-bracket product blocks along with the top-level title, restoring readable TOML. The day-to-day uses follow naturally from the two formats living in different ecosystems. A Rust developer can convert a Cargo manifest to JSON to feed it into a script that reads dependency versions programmatically. A Python developer can turn a project configuration file into JSON to inspect it with tooling that only speaks JSON. A DevOps engineer migrating a service between tools can convert a TOML configuration into JSON, adjust it, and convert it back without retyping the structure. During debugging, pasting a TOML file that a program refuses to load often reveals the real problem immediately: a table header that was duplicated, an array of tables that used single brackets instead of double, or a string that was left unquoted where the syntax requires quotes. A few tips make the conversion reliable. Keep in mind that TOML is strict about types, so a value written without quotes is parsed as a number, boolean, or datetime, and only quoted text becomes a string; if you meant a version like 1.0 to stay a string rather than the float one, wrap it in quotes on the TOML side. When converting JSON back to TOML, remember that JSON has no native date type, so a datetime that started as a TOML value will round-trip as a string unless you keep its original notation. The converter targets the common v1.0.0 subset that configuration files actually use, which covers tables, nested and dotted tables, arrays of tables, inline tables, the standard scalar types, arrays, and comments; extremely rare constructs may not round-trip perfectly, but standard Cargo, Poetry, and CLI configuration files convert cleanly in both directions, and because everything runs locally your data stays on your machine.

TOML to JSON Converter Formula & Method

[table] → nested object; [a.b] → object in object; [[key]] → append element to array under key; unquoted scalars typed as int/float/bool/datetime; quoted → string; {..} → inline object; '#' → comment dropped

Examples: TOML to JSON Converter

Input

title = "TOML Example"

Result

{ "title": "TOML Example" }

A bare quoted key-value pair becomes a single top-level JSON string property.

Input

[[products]] name = "Hammer" id = 1 [[products]] name = "Nail" id = 2

Result

{ "products": [ { "name": "Hammer", "id": 1 }, { "name": "Nail", "id": 2 } ] }

The double-bracket [[products]] header means append, so both blocks collapse into one array holding two objects with numeric ids.

Frequently Asked Questions – TOML to JSON Converter

Paste your TOML text into the input area and the converter produces the equivalent JSON object instantly. It handles tables, nested and dotted tables, arrays of tables, inline tables, and typed scalar values, following the TOML v1.0.0 specification. The tool runs entirely in your browser, so there is no signup and nothing is uploaded to a server.