TOML formatter
Processed in your browser · nothing is uploaded
Reindents a TOML file so tables sit flush left, their keys are indented beneath them, and there is one blank line between tables. Values are spaced evenly around the equals.
How to use the toml formatter
TOML was designed to be obvious to read, and the thing that undermines that most is a file where some entries are indented and some are not — which is what happens after a few tools have written to it. Nothing here changes meaning: TOML ignores leading whitespace entirely, so indentation is purely for the reader. The part people get wrong is what a table header actually does. `[dependencies]` is not a section that ends somewhere; it sets the current table, and every key after it belongs to that table until the next header. That is why moving a key one line up or down between two headers silently reparents it, and why the indentation this produces is genuinely useful — the ownership becomes visible. A dotted key like `[a.b]` creates nesting, and `[[a]]` — double brackets — is an array of tables, which is how you write a repeated block. Confusing the two is the most common TOML mistake: one `[[bin]]` per binary, not one `[bin]` you keep adding to.
Questions
No, it is ignored entirely. This is for the reader — which is the point, since TOML exists to be read.