TOML formatter and validator
Paste a Cargo.toml, pyproject.toml or any TOML file. The tool checks the syntax and duplicate keys, then lays the file out consistently without changing a single value.
Runs in your browser: nothing you enter is sent anywhere.
How to use it
- Paste your TOML.
- Choose the indent for items of multi-line arrays, and whether tables should be preceded by a blank line.
- Copy the result. If something is wrong, the message names the line and column.
What changes
key=value becomes key = value; headers like [ a . b ] become [a.b].
- Runs of blank lines collapse to one, and a blank line is put before each
[table] and [[array of tables]], together with the comment lines right above it.
- Arrays written on one line get
, between items. Arrays spread over several lines get one item per line, a trailing comma and the chosen indent.
- Inline tables become
{ a = 1, b = 2 }.
Multi-line strings are never touched, since their whitespace is part of the value.
Example
ports=[8000,8001]
becomes ports = [8000, 8001].
Limits
The check is about structure. It does not look at whether a date such as 2024-02-31 exists, and it does not enforce the types an application expects.
Frequently asked questions
Which parts of TOML are supported?
Tables, arrays of tables, dotted keys, basic, literal and multi-line strings, decimal, hex, octal and binary integers, floats including inf and nan, booleans, dates and times, arrays (also across lines, with comments) and inline tables written on one line. It is a practical subset of TOML 1.0.
Does formatting change my data?
No. Values are copied exactly as you wrote them: strings keep their quotes, numbers keep their digits and underscores. Only spaces around = and commas, blank lines and the layout of multi-line arrays change.
What does it report as an error?
Syntax problems, unterminated strings, unknown escapes, unclosed arrays and inline tables, text after a value, and keys or tables defined twice. Each message gives the line and column.
Are comments kept?
Yes. Full-line comments, comments after a value, and comments inside multi-line arrays are kept.
Is anything uploaded?
No. Parsing and formatting run in your browser, so config files with secrets never leave your device.