Ready
Ln 1, Col 1Blog

Tool Kumar tool

JSON to TOML

Turn JSON configuration into TOML tables. Nested objects become table headers and arrays of objects become arrays of tables. Review the output comments for values TOML cannot represent.

How to use this tool

  1. Paste valid JSON configuration.
  2. Review the TOML tables and any comments about omitted or changed values.
  3. Copy or download the TOML, then validate it against your application configuration schema.

Worked example

The generated TOML has a [profile] table and two [[items]] tables. The null note is omitted with a comment.

Input

{
  "user-id": 42,
  "profile": {
    "city": "London",
    "created_at": "2026-10-14T09:00:00Z"
  },
  "items": [
    {
      "price": 12,
      "note": null
    },
    {
      "price": 12.5,
      "note": "gift"
    }
  ]
}

Output

user-id = 42

[profile]
city = "London"
created_at = "2026-10-14T09:00:00Z"

[[items]]
price = 12
# note = null (omitted: TOML has no null)

[[items]]
price = 12.5
note = "gift"

Move a config into a TOML-based stack

Use the output for data accepted by a TOML-consuming application, then check that application's schema. Rust Cargo.toml and Python pyproject.toml require specific tables and keys; converting a shape does not create those project files for you.

In this example, each item is a separate [[items]] table. The first note is omitted because it is null. Compare with the source before saving.

If preserving nulls matters, keep JSON or use YAML rather than silently accepting a changed config.

Options and edge cases

  • TOML has no null value. Null properties are omitted with a comment, and null elements inside arrays or inline objects are dropped. This conversion can change the data.
  • Integers outside signed 64-bit range are written as quoted strings with an explanatory comment.
  • A top-level array or scalar is wrapped under the root name, which is root by default, because a TOML document must be a table.
  • Strings remain strings, including date-looking values. Keys with spaces are quoted.

Private by default

Your document stays in this browser. Tool Kumar parses, converts and creates downloads on your device, with no account or upload step.

JSON to TOML questions

Is JSON to TOML lossless?
Not for every document. TOML has no null, and integers must fit signed 64-bit. The exporter omits nulls and quotes out-of-range integers, with comments explaining those changes.
How are arrays of objects represented?
They become arrays of tables, such as [[items]], with one table for each object.
Can I convert back to JSON?
Yes. Use TOML to JSON for the edited config. Omitted null values cannot be recovered automatically.
Can a top-level JSON array become TOML?
Yes. The converter wraps it under the root name because TOML requires a table at the document root.

Related tools

TOML to JSON, JSON to YAML, JSON validator.