Skip to content
XUtilHub

TOML to JSON Converter Online

Convert TOML to JSON online. Supports tables, arrays of tables, inline tables and dates. Free and private.

  • Free, no sign-up
  • Runs in your browser, nothing uploaded
TOML
Output

About the TOML to JSON

Convert TOML configuration files (Cargo.toml, pyproject.toml and others) into JSON.

Key features

  • Full TOML 1.0 support
  • Tables, inline tables and arrays of tables
  • Dates and times converted to ISO strings
  • Clear parse errors with line numbers
  • Upload .toml files directly
  • Pretty-printed JSON output

Convert TOML configuration to JSON

TOML is the configuration format behind Cargo.toml (Rust), pyproject.toml (Python packaging, Poetry, Ruff, Black), Hugo, Netlify, Deno, Starship and many other tools. Converting it to JSON is useful when you want to process a config with JSON tooling, inspect it in a tree view, feed it to an API or migrate to a system that expects JSON.

Example

[package]
name = "my-app"
version = "1.2.0"
authors = ["Ada <ada@example.com>"]

[dependencies]
serde = { version = "1.0", features = ["derive"] }

[[bin]]
name = "cli"
path = "src/main.rs"
{
  "package": {
    "name": "my-app",
    "version": "1.2.0",
    "authors": ["Ada <ada@example.com>"]
  },
  "dependencies": {
    "serde": { "version": "1.0", "features": ["derive"] }
  },
  "bin": [
    { "name": "cli", "path": "src/main.rs" }
  ]
}

TOML to JSON mapping

TOMLJSON
key = "value""key": "value"
[table]Nested object
[a.b.c]Deeply nested object
{ x = 1 } inline tableObject
[[items]]Array of objects
1979-05-27T07:32:00ZISO date string
# commentDropped

Tips

  • Errors with line numbers. If the TOML is invalid, the error points to the problem line. The TOML Validator is focused on that job.
  • Duplicate keys are an error in TOML, even across [table] sections.

Convert in the other direction with JSON to TOML, or turn the JSON into YAML with JSON to YAML.

How to use the TOML to JSON

  1. Paste your data into the input box, upload a file, or click Sample to try it out.
  2. Adjust the options above the editor if you need to (indentation, delimiter, and so on).
  3. The JSON appears instantly in the output panel. Any errors are shown with their line and column.
  4. Click Copy to copy the result, or Download to save it as a file.

Frequently asked questions

What is TOML?

TOML (Tom's Obvious, Minimal Language) is a configuration file format designed to be easy to read and to map unambiguously to a hash table. It's used by Rust (Cargo.toml), Python (pyproject.toml), Hugo, Netlify and many CLIs.

How are TOML dates converted?

TOML has native date and time types; JSON doesn't. They're converted to ISO 8601 strings, e.g. 1979-05-27T07:32:00.000Z.

What are [[double bracket]] tables?

Arrays of tables. Each [[bin]] block becomes one object in a JSON array named bin.

Are comments preserved?

No. JSON has no comment syntax, so TOML # comments are dropped.

Is my JSON uploaded to a server?

No. All JSON tools run entirely in your browser, so your data never leaves your device.

Is there a size limit?

There is no fixed limit. Files of several megabytes work fine; very large files depend on your device's memory.

Do I need an account?

No. Every JSON tool is free and works without signing up.

Last updated:

Related JSON tools