TOML ↔ JSON Converter
Convert between TOML and JSON formats. Supports tables, arrays, nested structures, and all standard data types.
Frequently Asked Questions
TOML (Tom's Obvious, Minimal Language) is a configuration file format designed to be easy to read. It maps unambiguously to a hash table and supports data types like strings, integers, floats, booleans, dates, arrays, and tables (sections). It's used in Rust's Cargo.toml, Python's pyproject.toml, and many other tools.
TOML is designed for human readability with support for comments, implicit nesting via dotted keys and [table] headers, and less punctuation. JSON is simpler but more verbose, doesn't support comments, and is the standard for APIs and data interchange. TOML excels as a config format; JSON excels as a data transport format.
This converter supports standard TOML features: tables ([section]), nested tables ([section.subsection]), key-value pairs, strings (basic and literal), integers, floats, booleans, arrays, inline tables, and comments (#). It handles the most common TOML patterns used in configuration files.
Yes. Nested JSON objects are converted to TOML tables using [section] headers. Arrays of objects become arrays of tables using [[section]] syntax. Primitive values become simple key-value pairs. The converter handles multiple levels of nesting.
Common reasons include: migrating configuration between tools that use different formats, using JSON tools to validate or transform TOML data, generating TOML config from JSON API responses, or converting TOML to JSON for use in JavaScript applications that don't have a TOML parser.