---
title: "TOML to JSON Converter - Private and Instant | CanDoYa"
description: "Convert TOML to JSON online with live validation, clean formatting and safe handling for dates and large integers. Your config stays in your browser."
url: https://candoya.com/tools/toml-to-json/
locale: en
type: browser-tool
---

# TOML to JSON Converter

Category: Developer

## How do you convert TOML to JSON?

Paste TOML into the converter and it parses keys, tables, arrays of tables and typed values into the equivalent JSON structure. Choose compact, 2-space or 4-space output, then copy or download the result. The conversion happens locally in your browser, so your configuration is never uploaded.

TOML is designed for readable configuration files such as `Cargo.toml`, `pyproject.toml` and `netlify.toml`. JSON is easier to feed into APIs, scripts and data tools. This converter expands dotted keys and table headers into nested objects, while arrays of tables become arrays of JSON objects.

JSON has no native date, 64-bit integer or non-finite number types. TOML dates and times become ISO-style strings. Integers outside JavaScript's safe range and values such as `inf` or `nan` also become strings, with a visible warning rather than silent rounding or `null`.

## How to use it

1. **Paste your TOML** - Type a document, paste a configuration file or load the Cargo-style example.
2. **Choose JSON spacing** - Select compact output or 2-space or 4-space indentation. Conversion and validation update live.
3. **Copy or download** - Review the conversion status, then copy the JSON or save it as a .json file.

## Who it's for

- **Rust developers** inspecting Cargo package metadata or dependencies as JSON for scripts and dashboards.
- **Python developers** converting pyproject.toml settings for tools that accept JSON input.
- **Platform engineers** transforming deployment and build configuration without uploading internal values.

## Expert note

A TOML array of tables such as [[products]] maps to a JSON array of objects, while dotted keys such as database.server become nested JSON objects. Comments disappear because standard JSON has no comment syntax.

## Frequently asked questions

### Is my TOML uploaded when I convert it?

No. Parsing and JSON serialization run inside your browser, and the TOML is not sent to a conversion server. This makes the tool suitable for configuration that may contain internal hostnames or settings. You should still protect secrets in anything you copy or download afterward.

### Is this TOML to JSON converter free?

Yes. You can convert, copy and download JSON without an account, installation or usage quota. Because the work runs on your device, practical limits depend on the memory and processing power available in your browser rather than a server-side file limit.

### Which TOML features does the converter support?

It supports TOML 1.1 keys, strings, integers, floats, booleans, date and time values, arrays, inline tables, standard tables and arrays of tables. It also handles dotted keys and comments. Invalid syntax and duplicate definitions produce a line and column error instead of partial JSON.

### What happens to TOML comments in JSON?

Comments are removed because standard JSON has no comment syntax. The data structure remains, but notes beginning with # do not. If a note must survive conversion, place it in a real TOML key such as description or _comment before creating the JSON.

### How are TOML dates and times represented in JSON?

TOML offset date-times, local date-times, local dates and local times become ISO-style JSON strings. This preserves whether the source included a date, time and offset, but JSON consumers will see a string rather than a native date type and must parse it when needed.

### Can TOML 64-bit integers be converted without rounding?

Yes. Safe integers stay JSON numbers. An integer outside JavaScript's exact safe range becomes a quoted decimal string and triggers a warning. This keeps every digit intact, although downstream code must deliberately convert that string to a BigInt or another 64-bit integer type.

## Related tools

- [YAML to JSON Converter](https://candoya.com/tools/yaml-to-json/)
- [JSON to YAML Converter](https://candoya.com/tools/json-to-yaml/)
- [JSON Formatter](https://candoya.com/tools/json-formatter/)
- [JSON Validator](https://candoya.com/tools/json-validator/)
- [XML to JSON Converter](https://candoya.com/tools/xml-to-json/)

---

*Markdown edition of <https://candoya.com/tools/toml-to-json/>, published for AI agents and other automated readers. Index of key pages: <https://candoya.com/llms.txt>.*
