JustConvertAll-in-One Convert

JSON to TOML Converter

Convert JSON objects to TOML configuration format instantly online. Handles nested objects as [tables] and arrays of objects as [[array tables]]. Free — runs entirely in your browser.

Related Tools

Advertisement

TOML (Tom's Obvious Minimal Language) was created by Tom Preston-Werner (GitHub co-founder) as a configuration file format that is more readable than JSON and less error-prone than YAML. It uses an intuitive key = value syntax, supports comments with #, uses [table] headers for nested sections, and has explicit data types for integers, floats, booleans, datetimes, and strings — making configuration files self-documenting.

TOML is the native configuration format for several modern developer ecosystems: Rust projects use Cargo.toml for dependencies and build settings, Python projects use pyproject.toml for packaging (PEP 518), and the Hugo static site generator uses config.toml. Converting from JSON to TOML is needed when migrating a project from a JSON-based configuration to TOML, or when a tool requires TOML input but the data originates from a JSON source.

This tool serializes a JSON object into TOML format: top-level scalar values become bare key-value pairs, nested objects become [table] sections with dotted paths, and arrays of objects become [[array of tables]] sections. JSON null values are serialized as empty strings since TOML has no native null type. Keys containing special characters are automatically quoted.

Common Use Cases

Migrating package.json to Cargo.toml structure

When porting a Node.js project to Rust or creating a Rust workspace, the project metadata (name, version, author, dependencies) needs to be expressed as TOML. Starting with the JSON structure and converting it gives developers a starting point for the Cargo.toml file, which they then refine with Rust-specific fields like edition and dependency version constraints.

Converting JSON API configuration to TOML for Hugo

Hugo themes and configuration tools often export site settings as JSON for portability. When a team switches to Hugo or upgrades from a JSON config.json to a TOML config.toml, converting the existing JSON settings provides the initial TOML file that the Hugo build system expects.

Generating pyproject.toml from Python project metadata

Python packaging tools like Poetry and Hatch store all project configuration in pyproject.toml. When a project has existing metadata in a setup.json or a CI-generated JSON manifest, converting it to TOML gives the starting structure for a pyproject.toml file, saving manual entry of all the key-value pairs.

Translating JSON configuration for TOML-native tools

Certain infrastructure tools — including some Ansible plugins, Zola (static site generator), and the Taplo TOML toolkit — only accept configuration in TOML format. When a team generates configuration programmatically as JSON (from scripts or Terraform outputs), converting the result to TOML is a necessary step before passing it to these tools.

How to Use

  1. Paste a JSON object in the left panel.
  2. The TOML output appears instantly in the right panel.
  3. Nested objects become [table] sections; arrays of objects become [[array]] sections.
  4. Click "Copy Output" to copy the TOML or "Download" to save as .toml.

Limitations