TOML to JSON converter

Convert TOML to JSON or JSON to TOML, and show the line of any error.

Runs in your browser. Your input is not uploaded.

Correctness last checked 2026-11-13. How we verify

Loading the tool…

What it does, how to use it, and questions

What it does

TOML is a config format used by Cargo, pyproject.toml and many tools. It is a table of keys, with [sections] for nested tables and inline tables in { }.

This page uses smol-toml, which accepts TOML 1.0. Dates become ISO strings in JSON. An integer bigger than 2^53 becomes a string so JavaScript does not round it.

How to use it

  1. Choose TOML to JSON or JSON to TOML.
  2. Paste the input.
  3. Fix the line named in the error, if there is one, and copy the result.

Example

Input
title = "ToolDeck"

[service]
image = "nginx:1.27"
Output
{
  "title": "ToolDeck",
  "service": {
    "image": "nginx:1.27"
  }
}

Things to watch for

  • TOML’s root has to be a table. A JSON array or a single value cannot be written as TOML.
  • YAML’s yes and no are not booleans in TOML. Use true and false.
  • A date such as 1979-05-27 becomes a string in the JSON. The time zone offset is kept when one was written.

Questions

Which TOML version is this?
TOML 1.0, parsed by smol-toml. Dotted keys, inline tables and arrays of tables are accepted.
Why did a big integer become a string?
JavaScript cannot store every integer exactly past 2^53. Keeping it as a string avoids changing the value.
Can I convert TOML to YAML?
Convert to JSON here, then use the YAML tool.
Is the config uploaded?
No. Parsing happens in this page. Treat a file that contains secrets as you would any paste.