Skip to main content
ToolsHub

TOML ↔ JSON Converter

Translate config files both ways between TOML and JSON with a real TOML parser, getting clean, correctly typed output and clear error messages when the input is malformed — all processed locally.

Updated

Files never leave your browser

Conversion runs entirely in your browser — your data is never uploaded.

How to use TOML ↔ JSON Converter

TOML and JSON are two popular formats for configuration files, and this converter translates between them in both directions. Paste a TOML config to get clean, formatted JSON, or paste JSON to produce equivalent TOML. It uses a real TOML parser so types are preserved correctly — numbers stay numbers, booleans stay booleans, dates stay dates, and nested tables map to nested objects. When the input is malformed, you get a clear error instead of broken output. Everything runs in your browser, making it a fast, private way to move config between tools that expect different formats.

  1. Choose the direction: TOML to JSON or JSON to TOML.
  2. Paste your config into the input box.
  3. Read the converted output on the right.
  4. Fix any reported errors in the source.
  5. Copy the result into your target file.

Your data never leaves your device — 100% private processing.

TOML and JSON compared

JSON is the lingua franca of data interchange — compact, ubiquitous, and supported everywhere — but it was designed for machines and is awkward to write by hand, with no comments and fussy punctuation. TOML was created to fix exactly that for configuration: it reads almost like an INI file, supports comments, and has unambiguous, human-friendly syntax for dates, multi-line strings, and nested sections. Many tools accept one format but not the other, which is where conversion comes in. Translating TOML to JSON lets you feed a hand-written config into code or APIs that speak JSON, while converting JSON to TOML produces a version that is pleasant for people to edit.

How types are mapped

Faithful conversion depends on preserving types, and this tool relies on a proper TOML parser rather than naive string manipulation to do that. TOML integers and floats become JSON numbers; booleans map directly; basic and literal strings become JSON strings; arrays become arrays; and tables and inline tables become objects. TOML's native date and time values are converted to ISO-style strings in JSON, since JSON has no date type of its own. Going the other way, the parser inspects each JSON value and emits the matching TOML syntax. Because the mapping is type-aware, a config converted from TOML to JSON and back arrives essentially unchanged apart from comments and incidental whitespace.

Worked examples

TOML → JSON

Inputs: name = "app" [db] host = "local"

Result: { "name": "app", "db": { "host": "local" } }

JSON → TOML

Inputs: { "port": 8080 }

Result: port = 8080

Glossary

TOML
A minimal, human-friendly configuration file format.
JSON
A widely used data-interchange format based on objects and arrays.
Table
A TOML key/value grouping, equivalent to a JSON object.
Array of tables
A TOML construct that maps to a JSON array of objects.

Related reading

Frequently Asked Questions

Free · No spam

Get weekly tool tips & updates

New tools, power-user tips, and productivity hacks — delivered free every Friday.

No spam, ever. Unsubscribe with one click.

Why use TOML ↔ JSON Converter?

  • Converts in both directions: TOML to JSON and JSON to TOML
  • Preserves data types including numbers, booleans, dates, and nested tables
  • Gives clear error messages for malformed input
  • Runs entirely in your browser, so your config is never uploaded

Common use cases

  • Convert a Rust or Python TOML config to JSON for a script
  • Turn a JSON settings file into TOML for a tool that requires it
  • Inspect a TOML file as JSON to understand its structure
  • Migrate configuration between tools with different format needs
  • Validate that a TOML file parses correctly

Related Developer Tools

Explore all Developer Tools.