What Is TOML (and Why Config Files Use It)?
TOML, Tom's Obvious Minimal Language, is designed specifically to be a readable, unambiguous config file format rather than a general-purpose data exchange format like JSON. It shows up most often in Cargo.toml for Rust projects and pyproject.toml for Python packaging, along with countless CLI tool configs, because it gives every value an explicit, unambiguous type, supports native dates and datetimes, and allows real comments, three things JSON cannot do natively. This toml viewer lets you convert a TOML file to JSON to feed it into JSON-only tooling, or go the other way to turn structured JSON into a hand-editable TOML config.
How to View and Convert TOML
Paste TOML into the left panel and the equivalent JSON appears on the right as you type, no button to press. To go the other way, switch the direction toggle to JSON to TOML, or hit Swap, which flips the direction and moves the current output into the input panel so you can convert it straight back. Every conversion runs through a debounced live pipeline, so a short pause in typing is enough to see the result update.
TOML Syntax This Tool Understands
Table headers like [package] and nested array-of-tables headers like [[dependencies]] are recognized and highlighted distinctly, since array-of-tables represents a list of tables rather than a single one. Native ISO 8601 dates and datetimes are highlighted as their own type, since TOML, unlike JSON, has a real date type rather than treating dates as plain strings. Numbers in hex, octal, and binary form, along with inf and nan, are all recognized as numeric values. Inline comments starting with # are correctly separated from the value they follow, even when that value is a quoted string that happens to contain a # character.
Common TOML Conversion Errors
A malformed table header, a key defined twice in the same scope, or an unquoted string where TOML expects a quoted one are the most common sources of a parse failure. Unlike some JSON parsers that silently keep the last value when a key repeats, TOML's own specification treats a duplicate key as invalid, so this tool reports it as a real parse error instead of quietly picking one value and discarding the other.
A Free TOML Parser and Formatter Online
As a toml to json converter, this doubles as a toml parser online and toml formatter online, letting you view toml online or convert toml to json online as a toml converter free of any signup. It works as a general toml online tool whenever a Cargo.toml or pyproject.toml file needs a second look.