TOML ⇄ JSON Converter

Convert TOML to JSON and JSON to TOML instantly with full TOML 1.0 support. 100% client-side.

493 chars
744 chars
🔒 100% private: All conversion happens in your browser. Your config files never leave your device.

About TOML to JSON Converter

TOML (Tom's Obvious Minimal Language) is a configuration file format designed to be easy to read and write. It is used by Rust (Cargo.toml), Python (pyproject.toml for Poetry/PEP 518), Hugo (config.toml), Netlify, and many modern tools. TOML is similar to INI files but with richer types: integers, floats, booleans, dates, arrays, and nested tables. Because many tools and APIs only accept JSON, converting between TOML and JSON is a common task — deploying a config, loading settings in a JS app, or migrating between ecosystems. This tool converts both ways in your browser with full TOML 1.0 support.

How It Works

  1. Choose a direction: TOML → JSON or JSON → TOML.
  2. Paste your TOML or JSON into the input box.
  3. The output updates live as you type.
  4. Copy the result or download it as a .json / .toml file.

✨ Key Features

  • ✓TOML → JSON conversion (TOML v1.0.0)
  • ✓JSON → TOML conversion
  • ✓Support for tables [section]
  • ✓Support for nested tables [a.b.c]
  • ✓Support for arrays of tables [[items]]
  • ✓Support for inline tables { key = "value" }
  • ✓Support for arrays (mixed types)
  • ✓Support for strings (basic, literal, multi-line)
  • ✓Support for integers, floats, booleans
  • ✓Support for dates and datetimes (RFC 3339)
  • ✓Live conversion as you type
  • ✓Download as .json or .toml file
  • ✓100% client-side — no data sent to any server

🎯 Common Use Cases

  • →Reading Cargo.toml or pyproject.toml as JSON
  • →Converting Hugo config.toml to JSON for a build script
  • →Migrating from JSON config to TOML
  • →Debugging TOML parsing errors
  • →Preparing TOML config from an API response
  • →Converting Netlify.toml for automated processing
  • →Building documentation of a TOML schema
  • →Learning the difference between TOML and JSON syntax

💡 Advanced Tips & Pro Insights

  • ▸TOML is stricter than JSON: strings must be double-quoted (basic) or single-quoted (literal). Bare strings are not allowed.
  • ▸TOML dates are first-class: 1979-05-27T07:32:00Z is a datetime, 1979-05-27 is a date. In JSON, these are strings.
  • ▸Arrays of tables ([[items]]) become arrays of objects in JSON. This is TOML's way of representing lists of structured records.
  • ▸Inline tables ({ key = "value" }) cannot span multiple lines in TOML 1.0. For multi-line structures, use regular tables.
  • ▸Order matters in TOML: a table cannot be defined twice. This tool preserves order and validates against duplicate keys.

Frequently Asked Questions

Is this TOML converter free?▾
Yes, this TOML to JSON and JSON to TOML converter is completely free with no signup, email, or usage limits.
Is my data safe?▾
Yes, 100% safe. All conversion happens in your browser. Your config files are never uploaded to any server.
What is TOML?▾
TOML (Tom's Obvious Minimal Language) is a configuration file format designed to be human-readable. It is used by Cargo.toml (Rust), pyproject.toml (Python), Hugo (config.toml), and many modern tools.
What is the difference between TOML and JSON?▾
TOML is designed for humans (config files) — it has comments, dates as a native type, and a cleaner syntax for tables. JSON is designed for machines (APIs) — it is more compact but less readable. TOML does not support null; JSON does.
Does it support multi-line strings?▾
Yes. TOML supports """triple-quoted multi-line""" basic strings and '''triple-quoted literal''' strings. Both are handled correctly and converted to JSON strings.
How are dates handled?▾
TOML has native date and datetime types. This tool converts them to ISO 8601 strings in JSON (e.g., "1979-05-27T07:32:00Z").
What happens to comments?▾
TOML comments (# ...) are ignored during parsing. They are not preserved in the output (neither JSON nor regenerated TOML has them).
Can I convert Cargo.toml or pyproject.toml?▾
Yes. Paste any Cargo.toml (Rust), pyproject.toml (Python/Poetry), or Hugo config.toml and convert it to JSON for use in scripts, APIs, or other tools.