TOML Formatter
You will meet TOML in pyproject.toml, Cargo.toml, static site generator configuration and increasingly in tooling settings. The format is deliberately simpler than YAML — indentation carries no meaning, sections sit in square brackets and values are key-value pairs on a line — but that does not mean nothing can go wrong. This tool checks whether each line reads as a section header, a key-value pair or a comment, and whether any key occurs twice within a section. The latter is explicitly forbidden in TOML and causes a hard error in a strict parser, while being easy to miss when reading. You get your TOML back with normalised indentation. This is a targeted check rather than a full TOML parser: value types are not validated, so a date in the wrong format or an unterminated multi-line string will not be caught here. Everything happens locally in your browser: your configuration never reaches our server. Free and unlimited to use, including commercially — no account, no licence, no limits.
What people use this for
[project] name = "westcube" version = "1.0.0"Same key twice in one section → message naming the keyLine that is not a key, section or comment → message with the line number
What others think of this tool
No reviews for this tool yet. Yours would be the first.
Do you work with Westcube?
Leave a review on Google tooFrequently asked questions
What is the difference between TOML and YAML?
The main one is that indentation carries no meaning in TOML. Structure comes from section headers in square brackets rather than from whitespace, so the whole class of indentation errors that makes YAML notorious simply does not exist here. TOML is also stricter about types: strings must be quoted, numbers must not. YAML is looser and guesses the type, which seems convenient until the country code "NO" is read as the boolean false. For configuration edited by humans TOML is more predictable; for deeply nested structures YAML is more compact.
Why can a key not appear twice?
The TOML specification forbids it explicitly: redefining an already defined key is an error, not an override. Strict parsers therefore reject the file. The awkward part is that it barely stands out when reading, especially in a long file where the same key sits near the top and near the bottom of a section. This tool names the key so you can find it immediately.
Does the tool also check whether my values are correct?
No, only the shape of the lines and duplicate keys. Value types are not validated: a date in a disallowed format, an unquoted string, an array that is never closed or a multi-line string that never ends will not be caught here. For the errors that cost the most time in practice the check is sufficient; for full certainty use the parser of the tool the file is actually meant for.
Can I paste my pyproject.toml here?
Yes, and it is one of the most common uses. A pyproject.toml often grows to dozens of lines with sections for the build, the dependencies and the settings of several tools — exactly the kind of file where a key accidentally ends up twice. Processing happens locally, so a file containing internal package names or a private registry is fine to paste here.