tomlkit.org
TOML utilities, in the browser
Say hi →

TOML to JSON Converter

Paste TOML on the left, get JSON on the right. Everything runs in your browser — files never leave your machine.

TOML to JSON Converter

updated 25 April 2026

Drop a .toml file here, or

Before you start

You need some TOML-formatted text or a .toml file from your computer (like Cargo.toml, pyproject.toml, or poetry.lock). I built this tool to be fully TOML 1.0 compliant, so it handles everything from basic key-value pairs to complex nested tables and arrays of tables without breaking a sweat.

Because I'm using a pure-JavaScript parser (smol-toml), the entire conversion happens locally in your browser. I never see your data, and nothing is ever sent to a server, which makes it safe for converting private configuration files. There is no hard file size limit, though extremely large lockfiles might cause a brief stutter as your browser renders the JSON output.

How to use it

  1. Paste your TOML into the left pane, or drag and drop a file directly onto the input area.
  2. Click Run to start the conversion process.
  3. Check the status bar at the bottom for any syntax errors — if your TOML is invalid, I'll show you exactly where.
  4. Review the JSON result in the right-hand pane.
  5. Click Copy result to put the output on your clipboard.

Example

Input (TOML):

[server]
port = 8080
enabled = true
tags = ["api", "prod"]

Output (JSON):

{
  "server": {
    "port": 8080,
    "enabled": true,
    "tags": ["api", "prod"]
  }
}

Notice that types like integers, booleans, and arrays map perfectly → JSON, while TOML-specific types like dates are stringified.

Tips & common pitfalls

Troubleshooting

I'm getting a parse error with a line and column number.

TOML is very particular about syntax. Common mistakes include forgetting quotes around string values, using single quotes where double quotes are needed for escaping, or having trailing commas in inline tables (which TOML doesn't allow).

The output pane is empty after I click Run.

If your input consists only of comments or empty tables, the resulting JSON will just be an empty object: {}. If you expected data, double-check that your keys and values are properly formatted.

My dates look different in the output.

That is intentional. TOML dates are converted to ISO 8601 strings (e.g., "2026-04-25T12:00:00Z") because JSON lacks a dedicated date type. This is the most compatible way to handle them.

Related tools

See also: if you need to do something adjacent on this site, try JSON to TOML to convert JSON to TOML, TOML to YAML to convert TOML to YAML, or YAML to TOML to convert YAML to TOML.

Frequently asked questions

Is my configuration data secure?

Absolutely. The smol-toml parser runs entirely in your browser. No data is ever uploaded to my server, and no network requests are made with your content. You can even use this tool while offline.

Does this support TOML 1.0 features?

Yes. It supports the full TOML 1.0.0 specification, including heterogeneous arrays, dotted keys, and all date/time formats. I keep the parser updated to ensure compatibility with modern Cargo and Poetry files.

How does this handle nested tables?

Nested tables ([a.b.c]) and arrays of tables ([[item]]) are converted into nested JSON objects and arrays of objects respectively. The mapping is 1:1 and follows the official TOML-to-JSON logic.

Why are my comments missing in the JSON?

Standard JSON does not support comments. To keep the output valid JSON, all # comments from your TOML source must be stripped during the parsing phase.

Can I convert the JSON back to TOML?

Yes, you can use the JSON to TOML converter on this site. Note that since JSON is less expressive than TOML, you might lose specific formatting choices (like inline vs. standard tables).

Is there a CLI alternative?

For command-line work, I recommend yq or taplo. Both are excellent tools that can handle TOML conversion and validation from your terminal.