Skip to main content
WizTools123
Free Online Tools

Tool Categories


Developer Tools New Tool

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.

Free Forever Nothing Uploaded Tree of tables and keys Runs in your browser
Free Online TOML Formatter and Validator, With a Table Tree
Share this tool
Advertisement Slot (Top Banner) Google AdSense Unit • Responsive Banner
TOML Formatter & Validator Everything happens in this tab. Nothing you paste is sent anywhere.
Your TOML
Result
Output

This TOML parses.

0 keys 0 tables 0 arrays of tables 0 levels deep

What this file declares

    The tree is built from the parsed value, so it shows the structure your file produced rather than the order you typed it in. Two [[server]] blocks appear as one array holding two tables, because that is what they are.

    Buy Us A Coffee

    Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.

    Buy Us A Coffee
    Sponsored Content (Below Tool) Google AdSense Placement

    A Table, an Inline Table and an Array of Tables

    Three things that look similar and are not.

    A table is written [database] and every key after it, until the next header, belongs to it. There can only be one [database] in a file; declaring it twice is an error rather than a merge.

    An inline table is written pool = { min = 2, max = 20 }. It means the same thing as a table with those two keys, but it must fit on one line and it cannot be added to later.

    An array of tables is written [[server]], with two brackets, and each repeat appends another table to the same array. Three [[server]] blocks give you a list of three servers. This is the piece people get wrong, usually by writing one bracket and then wondering why the second block overwrote the first, and it is the reason the tree on this page exists.

    How to Check and Format TOML

    A few steps, and nothing is uploaded.

    1
    Paste your TOML A Cargo manifest, a pyproject file, a Hugo or Netlify config. It is parsed as you type and nothing is uploaded.
    2
    Read the tree 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.
    3
    Pick a view 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.
    4
    Copy or download Or press Use as input to run the result through again, for example to sort the keys of what you just tidied.

    What to Know About TOML

    Starting with the double brackets that confuse everyone.

    Double brackets mean an array of tables, not a nested table. [[server]] appends a table to a list called server, so writing the block twice gives you two servers. [server] with one bracket declares a single table, and writing it twice is an error. This is the single most confusing part of TOML, and the tree on this page shows which one your file produced.
    Re-emitting loses your comments, and that is not a bug that can be fixed here. The parser produces data, and a # comment is not data, so there is nothing left to write back. Blank lines and your chosen key order go the same way. This is a reformatter and a checker, not a comment-preserving editor, so keep the original for a file that people maintain by hand.
    Dates and times come back in a normal form. TOML has real date, time and date-time types, and the parser turns them into JavaScript dates. When they are written out again they appear in the standard offset form, so 2024-03-14 may come back with a time on it. The value is the same moment; the spelling is not necessarily the one you typed.
    It checks the syntax, not whether your settings make sense. A file that parses cleanly here can still be rejected by Cargo, Poetry or Hugo, because those tools expect particular keys in particular places. This page tells you the TOML itself is sound and shows you exactly what it produced, which is usually enough to find the real problem.

    Key Features & Capabilities

    What this tool does, and what it deliberately does not.

    Validates as you type A tick when it parses, and a position when it does not.
    Tree of tables Every table, array of tables and key, with its kind beside it.
    A JSON view The parsed value as JSON, for when the structure must be unambiguous.
    Tidy re-emission Sorted keys, indented tables and short arrays kept on one line.
    Counts the structure Keys, tables, arrays of tables and how deep the nesting goes.
    Nothing uploaded Config files carry hosts and tokens; this one stays in your tab.

    About the TOML Formatter

    TOML was designed to be an obvious configuration format, and for flat files it is. It becomes less obvious the moment tables get involved: a single bracket declares a table, a double bracket appends to an array of tables, and an inline table with braces does the same job as a table header but cannot be extended. Reading a file and predicting the data structure it produces takes more care than the format admits.

    So this page does two things at once. It validates and re-emits the file, with controls for key order, array layout and indentation, and it draws the parsed result as a tree of tables and keys. The tree is the useful half. It is built from the data the parser returned, which means it shows what your file declares rather than what the layout suggests it declares.

    Parsing is done by a TOML parser in the page; the writing half was written here, because control over table order, inline arrays and indentation was needed and a generic serialiser does not give you that. What could not be built, and is said plainly on the page, is comment preservation: the parser discards comments, so a round trip through this tool drops them.

    Frequently Asked Questions

    Tables, arrays of tables, comments and dates.

    One bracket declares a single table, and it may appear only once in the file. Two brackets declare an element of an array of tables, and each repeat appends another table to that array. So three [[server]] blocks give you a list of three server tables, while three [server] blocks are an error. The tree on this page shows which one you got.

    Because the output is written from the parsed data, and comments are not part of the data. A TOML parser reads them and throws them away, so there is nothing to put back. Use this page to check a file and to tidy generated output, and keep your original for anything maintained by hand.

    TOML has genuine date and date-time types, and the parser converts them into date values. When those are written back out they take a standard form, which can add a time or an offset to what you wrote as a plain date. The instant being described has not changed, only its spelling.

    Yes. Set Show as to JSON and the output box holds the parsed value as formatted JSON, which you can copy or download. It is a genuinely useful way to settle an argument about whether something is a table or an array of tables, because JSON has no ambiguity there.

    No. It checks that the TOML is syntactically valid and shows you the resulting structure. Whether Cargo, Poetry, Hugo or Netlify will accept those particular keys is a different question, and answering it would need each tool's own schema. In practice, seeing the real structure is what tells you why a tool is unhappy.

    Every Other Developer Tool

    88 more tools in this set. All free, all in your browser.

    Advertisement Slot (Bottom Banner) Google AdSense Unit • Responsive Banner