About
Tool No. 52 of Pikkola
TOML was designed to be read by a human first and a program second, which makes a broken file feel like a typo and not like a crash. This page reads it by the grammar, shows it as JSON or YAML, and writes it back in the order you had. Everything happens in the tab.
What it does
- Reads a TOML 1.0 document: tables, arrays of tables, dotted keys, inline tables, four string styles, integers in four radixes, floats, booleans and the four date and time forms.
- Writes the same document as TOML, JSON or YAML. Any of the three can be the source, so all six directions are open.
- Checks as you type. A mistake arrives with the line, the column and the character that stopped the parser, and the finding is a button that moves the caret there.
- Keeps comments when the source and the target are both TOML, attached to the key or the table they sat above.
- Four examples that are shaped like real files: a pyproject, a Cargo manifest, a Wrangler configuration and a service config.
- Indent of two or four spaces, alphabetical sorting, a copy button, and a download with the right extension and media type.
How a document becomes one tree
TOML has four ways to write the same idea. A key and a value, a [table] header, a [[table]] that repeats, and a dotted key that walks into a table without a header. All four end in the same place: an ordered tree of tables, where an array of tables is an array of trees.
The parser keeps that tree in a Map, not a plain object, because a plain object sorts the keys that look like numbers to the front and would quietly reorder a table whose keys are timestamps or ports. Dotted keys create the tables they walk through, and the parser remembers which tables came from a dot, because a header may not later declare one of them. That is the rule that makes "a.b = 1" followed by "[a]" a mistake, and the message says so.
Dates and times are kept as the text that was written. A value of 2026-11-21T08:43:00+09:00 is not turned into a browser Date and back, because that round trip would drop the original offset and the fractional seconds. It travels as text, becomes an ISO 8601 string in JSON and YAML, and comes back exactly as it was in TOML.
What the writer decides
A table with only simple values becomes a header and a list of keys. A table that holds only other tables does not get a header of its own, since the deeper headers already create it. An array of tables is written as repeated [[headers]], which is how a TOML reader expects to see a list of records.
Strings with a line break and a final newline are written as a multiline basic string, where that form is exact. Everything else is written as a one line string with escapes, because a multiline string that does not end in a newline has no spelling that preserves it exactly.
Comments are attached to statements when the document is read, and put back when it is written. A comment that sat between two keys with no statement of its own is not carried, and the count in the checks panel says how many were kept so the number is never a guess.
Where the limits are
- TOML 1.0.0 is the target. A TOML 1.1 draft feature, such as a multiline inline table or the \e escape, is reported rather than accepted.
- JSON has no date type and neither has YAML that survives three formats, so a date becomes a string there. This is a property of the target format, not a loss in this page.
- null exists in JSON and YAML and not in TOML. A null key is left out of TOML output and named in the checks, rather than being turned into an empty string.
- A number outside the range a double can hold exactly arrives as a double. The parser warns when that happens to an integer literal.
- The YAML reader covers the block and flow styles, quoted keys, block scalars, anchors, aliases and comments. Merge keys and custom tags are not interpreted.
- Nothing is fetched. There is no remote reference to resolve and no schema to download.
Why it is free
Pikkola builds small tools with one job each and keeps them free, with no account and no lock on the result. A static page that works in the browser costs almost nothing to serve, so there is no reason to charge for it or to watch who uses it.
Contact
A TOML file this page refuses but a parser accepts, a table that is written in a shape you did not expect, a Korean or Japanese sentence that reads badly: hello@pikkola.com. The smallest file that shows the problem is the most useful thing to send.