HCODX/TOML to JSON
100% browser-based · UTF-8 safe · No upload

TOML to JSON

Convert TOML (Tom's Obvious, Minimal Language) into JSON. Tables, sub-tables, arrays of tables, inline tables, and typed values are all supported via the @iarna/toml parser, running in your browser.

TOML input
JSON output
Conversion options
Reverse (JSON → TOML)
Input size
0 B
Output size
0 B
Output lines
0
Status
Ready
Example

TOML in, JSON out

A small sample to show the shape of the conversion. Pretty-printed output, types preserved where possible.

TOML
[db]
host = "localhost"
port = 5432
JSON
{
  "db": {
    "host": "localhost",
    "port": 5432
  }
}
Use cases

What you'll use this for

TOML to JSON shows up in every backend and ETL stack — feeding APIs, migrating configs, debugging payloads.

API & data imports

Prepare payloads for REST APIs and ingestion endpoints.

Data migration

Move configuration and tabular data between systems and formats.

Debugging

Inspect production data in a sensible, structured form.

ETL pipelines

Stage transformations between formats in your data flow.

Step by step

How to convert TOML to JSON

1

Paste your TOML

Drop your source into the left editor. The sample loads on first visit — replace it with your data.

2

Click Convert

Or leave Auto-convert on for live updates as you type. Conversion runs locally.

3

Review the output

The right pane shows pretty-printed JSON with status, byte counts, and line count.

4

Copy or download

Use the action bar to copy to clipboard or save as a file. Or jump to the reverse converter for round-trip checks.

FAQ

Frequently asked questions

TOML 1.0 via @iarna/toml v2.2 — the most popular browser-friendly TOML parser.

TOML datetimes parse into JS Date objects; JSON.stringify renders them as ISO 8601 strings.

[[server]] blocks produce a JSON array of objects. Each [[server]] repetition appends one entry.

Yes: point = { x = 1, y = 2 } becomes { "point": { "x": 1, "y": 2 } }.

Yes. Parsing runs in your browser using a CDN-loaded library.

About

About TOML to JSON

TOML is the config format behind Cargo (Cargo.toml) and PEP 621 (pyproject.toml). It's intentionally simple, INI-flavored, and unambiguous. Converting to JSON lets you feed it to any JSON-aware tool.

How parsing works

  • [table] headers create nested objects.
  • [[array.of.tables]] creates arrays of objects.
  • Inline tables, arrays, and typed values (int, float, bool, date) are preserved.
  • JSON output is pretty-printed.

Use cases

  • Inspect Cargo.toml or pyproject.toml as JSON.
  • Migrate config between TOML- and JSON-only tools.
  • Generate JSON Schemas from existing TOML.
Related

Related tools