---
title: "JSON to TOML Converter - Preserve Config Values"
description: "Convert JSON to TOML locally with tables, arrays and exact large integers. Spot unsupported nulls, copy your config or download a .toml file. No upload."
url: https://candoya.com/tools/json-to-toml/
locale: en
type: browser-tool
---

# JSON to TOML Converter

Category: [Developer](https://candoya.com/tools/dev/)

## How do you convert JSON to TOML?

This JSON to TOML converter turns a JSON object into a readable configuration file. Nested objects become tables, arrays of objects become arrays of tables, and string values stay strings. Paste your JSON to convert it locally, resolve any unsupported values, then copy the TOML or download the file.

A nested object such as `{"server": {"port": 8080}}` becomes a `[server]` table containing `port = 8080`. Arrays of objects use repeated `[[name]]` sections. Keys containing dots, spaces or punctuation are quoted so they stay single keys.

The converter changes the file format, not the configuration schema. A JSON package description still needs the fields expected by Cargo, Hugo or your application's TOML loader. An empty JSON object produces a blank TOML document, which is valid.

## How to use it

1. **Paste a JSON object** - Enter strict JSON in the input editor, or load the example. The top-level value must be an object. Output updates as you type.
2. **Resolve any incompatible values** - Errors identify the JSON path. Replace null values, or open Conversion options to omit null-valued object properties. Null array items must be handled explicitly.
3. **Copy or download the TOML** - Copy the completed output or download config.toml. Your input and converted data stay in the browser.

## Who it's for

- **Application settings:** turn nested JSON configuration into TOML tables that are easier to edit by hand.
- **Migration checks:** find null values and duplicate keys before moving a JSON configuration into a TOML-based system.
- **Developer documentation:** create TOML examples from JSON fixtures while keeping dates, version strings and large integer IDs intact.

## Expert note

The integer 9007199254740993 is already beyond JavaScript's safe integer range. Reading it with ordinary JSON.parse can change its last digit before conversion even starts. This converter reads integer tokens directly and preserves every digit within the signed 64-bit range. Quote larger IDs to keep them as strings.

## Frequently asked questions

### Is this JSON to TOML converter free and private?

Yes. It is free and needs no account. The JSON input and TOML output are processed locally in your browser. They are not uploaded or saved by the converter. Copy or download your result before closing the page.

### Can every JSON value be converted to TOML?

No. TOML requires a table at the root and has no null type. This converter rejects top-level arrays and scalar values, duplicate keys, unpaired Unicode surrogates and unsupported numbers. An error clears the output so you cannot accidentally copy a partial conversion.

### What happens to null values?

Conversion stops by default and shows the offending JSON path. You can explicitly choose to omit object properties with null values in Conversion options. A warning reports how many were removed. Null array items always produce an error because removing one would change array positions.

### Are large integers and decimal numbers preserved?

Integer tokens from -9223372036854775808 through 9223372036854775807 retain their exact digits. Decimal and exponent tokens use IEEE 754 binary64 precision and may round, as in most JavaScript applications. Overflow and underflow to zero are rejected; negative zero is normalized to zero. Put exact decimal amounts or larger integers in quotes to preserve them as strings.

### Do dates become TOML date values?

No. JSON has no date type, so a date-looking string remains a quoted TOML string. This also protects version numbers and values such as "true" from changing type. Convert a string into a native TOML date manually only if your application requires it.

### Does this generate a ready-to-use Cargo.toml or pyproject.toml?

It generates TOML syntax from your JSON structure. It does not rename fields, infer dependencies or validate a Cargo or Python project schema. Check the required tables and settings for the application that will read the file.

### Which JSON formats and sizes are supported?

Use strict JSON with a top-level object. Comments and trailing commas are not accepted. To keep the editor responsive, each input is limited to 1,000,000 characters and 64 nested objects or arrays. Split a larger configuration into smaller objects before converting.

## Related tools

- [TOML to JSON](https://candoya.com/tools/toml-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/)
- [YAML to JSON Converter](https://candoya.com/tools/yaml-to-json/)

---

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