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 in, JSON out
A small sample to show the shape of the conversion. Pretty-printed output, types preserved where possible.
[db] host = "localhost" port = 5432
{
"db": {
"host": "localhost",
"port": 5432
}
}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.
How to convert TOML to JSON
Paste your TOML
Drop your source into the left editor. The sample loads on first visit — replace it with your data.
Click Convert
Or leave Auto-convert on for live updates as you type. Conversion runs locally.
Review the output
The right pane shows pretty-printed JSON with status, byte counts, and line count.
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.
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 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.tomlorpyproject.tomlas JSON. - Migrate config between TOML- and JSON-only tools.
- Generate JSON Schemas from existing TOML.