TOML Viewer
Paste a TOML file, such as a Cargo.toml or pyproject.toml, and read it as a collapsible tree rather than scanning sections by eye. A self-contained parser handles tables and arrays of tables, dotted keys, inline tables, basic, literal, and multi-line strings, and integer, float, boolean, and datetime values. Toggle to a clean JSON view to see the structure another way. Nothing is uploaded — parsing happens entirely in your browser, so project manifests and config stay on your machine.
How to use the TOML Viewer
Paste TOML into the box or load a .toml file. The tree appears as you type, with table names, keys, array indices, and typed values colour-coded so structure is obvious at a glance. Click any triangle to fold or unfold a section, or use Expand all and Collapse all to open or close everything. A [table] header becomes a nested object, and a [[array]] header becomes an entry in a list, exactly as a TOML loader would build them.
Switch on Show as JSON to render the same data as pretty-printed JSON. This is the quickest way to confirm how dotted keys nested, whether a value parsed as a number or a string, and how inline tables expanded. If the input is not valid TOML, the tree is replaced by an error box describing the line and the problem, such as a duplicate key or a value that could not be parsed, so you can correct it without guessing.
What TOML is and how it is shaped
TOML, Tom's Obvious Minimal Language, is a configuration format designed to map cleanly and unambiguously onto a hash table. Its stated goal is to be easy for humans to read and write while leaving no room for the parsing ambiguity that plagues looser formats. Every TOML file is a tree of key-value pairs grouped into tables. A bare table is declared with a header in square brackets, [database], and everything beneath it until the next header belongs to that table. Nested tables are written with dotted headers like [servers.alpha], and the same dotting works on keys directly, so servers.alpha.ip = "10.0.0.1" is equivalent.
The distinctive structure is the array of tables, written with double brackets [[products]]. Each occurrence of that header appends a new table to a list, which is how TOML expresses a sequence of repeated records, the dependencies in a Cargo manifest being the canonical example. Inline tables, { x = 1, y = 2 }, pack a small table onto one line, and arrays, [1, 2, 3], hold ordered values. Strings come in four flavours: basic strings with backslash escapes in double quotes, literal strings in single quotes with no escaping at all, and triple-quoted multi-line variants of each. Values are strongly typed into integers, floats, booleans, and first-class date and time types.
TOML is most visible as the backbone of two ecosystems: Rust's Cargo.toml and Python's pyproject.toml, the latter now the standard home for build configuration and tool settings. Compared with YAML, TOML trades indentation sensitivity for explicit brackets, which removes the whitespace traps but makes deeply nested data more verbose. Compared with INI, which it superficially resembles, TOML adds a real type system, nesting, and a formal specification, so two compliant parsers agree on what a file means. This viewer implements the common surface of the language; a handful of rare edge cases in the full specification, such as some exotic datetime offsets or unusual escape sequences, may not be covered, so treat it as a fast reader rather than a conformance checker.
Common use cases
- Reading Cargo and pyproject files. Browse dependencies, features, and tool config as a tree instead of scrolling through sections.
- Checking nesting. Confirm that dotted keys and table headers produced the structure you expected before committing.
- TOML to JSON. See the JSON equivalent to paste into a tool or script that does not read TOML directly.
- Spotting type surprises. Verify whether a value parsed as an integer, float, boolean, or datetime.