JSON to TOML Converter

FreePrivateInstant
JSON input
TOML output
Ctrl+Enter Convert to TOML

JSON to TOML Converter

Convert a JSON config object to valid TOML format. Nested objects become [section] tables, arrays of primitives become inline arrays, and arrays of objects become [[section]] array tables. Useful for Cargo.toml, pyproject.toml, Hugo config, and other TOML-native tools. Runs entirely in your browser.

Where Is This Useful?

Rust Cargo.toml config
Rust projects use Cargo.toml for package and dependency configuration. If you have dependency or workspace settings in JSON, convert them to TOML format to use directly in your Rust project.
Python pyproject.toml
Modern Python projects use pyproject.toml for tool configuration (Poetry, Ruff, Black, mypy). Convert a JSON config draft to TOML to get the correct format for your Python toolchain.
Hugo and static site config
Hugo, Zola, and several other static site generators support TOML for their config files. If you draft your site config in JSON, convert it here to get the TOML equivalent.

How to Use

  1. Paste a JSON object (not an array) in the input panel
  2. Click Convert to TOML or press Ctrl+Enter
  3. Review the TOML output — nested objects become [sections]
  4. Copy the output or download as a .toml file

Conversion Rules

  • Strings → quoted TOML strings
  • Numbers and booleans → unquoted TOML values
  • Nested objects → [section] table headers
  • Arrays of primitives → ["a", "b"] inline arrays
  • Arrays of objects → [[section]] array of tables
  • Null values → omitted (TOML has no null equivalent)

Frequently Asked Questions

What is TOML?

TOML (Tom's Obvious Minimal Language) is a config file format designed to be human-readable. It is used by Rust (Cargo.toml), Python (pyproject.toml), Hugo, and many other tools.

Does the input need to be a JSON object?

Yes. TOML files are always top-level key-value tables, so the root must be a JSON object. Arrays or primitive values at the root are not valid in TOML.

How are nested objects converted?

Nested JSON objects become TOML table sections using the [section] and [section.subsection] header syntax.

How is this different from JSON to YAML?

Both YAML and TOML are human-readable config formats. YAML is more common in Kubernetes and Docker ecosystems. TOML is more common in Rust, Python, and Go tooling.

Is my JSON uploaded anywhere?

No. Everything runs locally in your browser. Your data never leaves your machine.

Related Tools