TOML ↔ JSON Converter

Convert TOML configuration files to JSON and back. Supports all TOML v1.0 data types.

By Marshkalk

TOML in UK open source and government tech

TOML (Tom's Obvious Minimal Language, created by Tom Preston-Werner of GitHub) has become the standard configuration format for Rust projects via Cargo.toml. The UK's Central Digital and Data Office (CDDO) has promoted Rust adoption in government digital services, which brings Cargo.toml into public-sector codebases. Hugo, the static site generator that uses config.toml by default, powers many UK public and charity websites. This tool converts between TOML and JSON in either direction, entirely in your browser.

TOML vs JSON vs YAML

FormatCommentsNative datesTypical use
TOMLYesYes (RFC 3339)Cargo.toml, pyproject.toml, Hugo config
JSONNoNoREST APIs, package.json, CI artefacts
YAMLYesPartialGitHub Actions, Kubernetes, Docker Compose

A practical difference between TOML and YAML surfaces in GitHub Actions workflows: YAML anchors can reduce repetition but introduce parser ambiguity; TOML avoids that entirely. When a project needs a config that developers read and edit, TOML is the clearer choice.

Conversion limits to keep in mind

TOML datetime values (RFC 3339) become ISO 8601 strings in JSON because JSON has no native date type. If you are converting pyproject.toml (PEP 517/518) to JSON for tooling that expects a specific schema, verify that date fields survive the round-trip correctly. Arrays of tables ([[tool.poetry.dependencies]]) are converted to JSON arrays of objects; the nesting is preserved but the TOML section semantics are lost.

Typical workflow

Paste your TOML or JSON into the left panel, select the conversion direction, and copy the result. For one-off checks during a code review or config audit, this avoids installing a local CLI tool. For automated pipelines, pair this with YAML to JSON when your stack mixes config formats across services.