Free Online TOML Formatter and Validator, With a Table Tree
Paste a TOML file and find out what it really declares. The parsed result is shown as a tree of tables and keys, so the difference between a table and an array of tables is visible, and the file is written back out tidily or shown as JSON instead.
Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.
How to Use TOML Formatter and Validator
Step by step, start to finish.
A Cargo manifest, a pyproject file, a Hugo or Netlify config. It is parsed as you type and nothing is uploaded.
Every table, array of tables and key is drawn with its kind, so you can see what the file declared rather than what you hoped it declared.
TOML gives you a tidy re-emitted file. JSON shows the parsed value with no room for doubt about what is a table and what is an array.
Or press Use as input to run the result through again, for example to sort the keys of what you just tidied.
Key Features
What this tool does, and what it does not do.
A tick when the file parses, and the line and column of the problem when it does not.
Every table, array of tables and key, with its kind beside it.
The parsed value as JSON, for when the structure must be unambiguous.
Sorted keys, indented tables and short arrays kept on one line.
Keys, tables, arrays of tables and how deep the nesting goes.
Config files carry hosts and tokens; this one stays in your tab.
About TOML Formatter and Validator
TOML was designed to be an obvious configuration format, and for flat files it is. Tables are where it takes more care: a single bracket declares a table, a double bracket appends to an array of tables, and an inline table in braces holds the same data as a table header but is closed once written. Predicting the data structure a file produces is easier with the structure in front of you, and that is what this page shows.
What does it show?
It validates and re-emits the file, and it draws the parsed result as a tree of tables and keys. The tree is built from the data the parser returned, so it shows what your file declares rather than what the layout suggests: two [[server]] blocks appear as one array holding two tables. Under the verdict, a count line gives the number of keys, tables and arrays of tables, and how deep the nesting goes. When the file does not parse, the message carries the line and column the parser reported.
Which layout options are there?
- Show as TOML for a tidy file, or JSON for the parsed value with no ambiguity.
- Sort keys alphabetically, useful for diffing two versions of a config.
- Keep short arrays on one line, for arrays that fit in 72 characters.
- Indent keys under their table, if you like a nested look.
Parsing is done by a TOML parser that runs in the page. The writer was built for this tool, so table order, inline arrays and indentation follow the switches above exactly. Because the output is written from the parsed data, comments are left out of it; keep your original file for anything maintained by hand and use the output to check structure or tidy generated config.
It works with Cargo manifests, pyproject files, Hugo and Netlify configs, and any other TOML you paste, and Use as input lets you run a second pass on the result.
Frequently Asked Questions
Common questions about this tool.
More Developer Tools
Other tools from the same hub, free and in your browser.
Feedback
No feedback on this tool yet. Yours would be the first.