TOML Duplicate Table Header Error Example
Check TOML-like lines for section headers, key = value pairs, duplicates, and simple quotes and brackets.
🔒 Processed entirely in your browser — nothing you enter here is ever uploaded.
The result appears on this page after you run the tool. Nothing you enter is uploaded.
Result
About this tool
This page opens the TOML validator preloaded with a short configuration that contains a real, common mistake: the [server] table is declared once near the top of the file with a host and port, and then declared again further down to add a timeout setting — most likely because the settings were added later without noticing the table already existed. The failing check below runs live the moment the page loads and reports the line of the second, duplicate header.
Unlike the double-bracket [[...]] array-of-tables syntax, a single-bracket table header like [server] is only allowed to appear once per file in TOML — every key that belongs to that table must be grouped under its one declaration. Redeclaring it later doesn't merge the two blocks; it is simply invalid, and it is an easy mistake to make in a config file that has grown by accretion, with new settings appended at the bottom instead of inserted into the existing table.
Replace the sample with your own TOML to see the same duplicate-header check applied to it. Compare it against the toml-config-example preset to see how the [[plugins]] array-of-tables syntax legitimately repeats a header without triggering this error.
Example. [server]\nport = 8080 passes. A second [server] fails with Duplicate TOML section header. A second [[products]] is allowed. port = 1 and another port = 2 in the same section fail with Duplicate key "port".
Limit. The check is line-oriented. Dotted keys are not nested, multiline values must fit the one-line quote test, and a semicolon is treated as a comment even though standard TOML comments start with #.