TOML to JSON Converter

Paste TOML, get formatted JSON

Input (TOML)

Output (JSON)

TOML to JSON Converter guide

TOML is the config format of Python (pyproject.toml), Rust (Cargo.toml), and Hugo. When a script or tool needs that config as JSON, paste it here.

How it converts

  • Tables. Each [table] becomes a nested object, and dotted headers like [tool.ruff] become deeper nesting.
  • Arrays of tables. Repeated [[name]] blocks become a list of objects.
  • Dates. TOML dates and times become ISO 8601 strings, such as 1979-05-27T07:32:00.000Z, because JSON has no date type.
  • Comments. Dropped, because the data passes through a plain object.

Example

[project]
name = "my-app"

[tool.ruff]
line-length = 90

// converts to

{
  "project": { "name": "my-app" },
  "tool": { "ruff": { "line-length": 90 } }
}

Frequently asked questions

Why did my date turn into a string?
JSON has no date type, so TOML dates and times are written as ISO 8601 strings.
Why do I get "Cannot redefine existing key"?
The same key or table appears twice in your TOML. Each key can only be set once.
Are my TOML comments kept?
No. JSON has no comments, so they are removed during conversion.