TOML validator

Handy before publishing Cargo.toml, pyproject.toml or Hugo settings. It shows the number of tables and values when the file passes.

Loading the tool…

Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.

How to use it

  1. Enter toml text.
  2. The result appears straight away and updates as you edit.
  3. Copy the result, or copy a link that keeps the same values to share it.

How it is calculated

The file is read character by character per TOML 1.0, checking string and number forms, the 64-bit range, dates (29 February only in leap years) and that no key or table is defined twice. The table count includes sub-tables and [[ ]] items but not the root table.

Example

Result: Result: Valid TOML; Details: The whole file was read without errors; Tables: 4.

Limits and caveats

  • It follows TOML 1.0, so TOML 1.1 additions such as multi-line inline tables give an error.
  • It checks syntax only, not the fields a particular tool expects.

Questions about this tool

Why is name = hello rejected?

Strings in TOML need quotes, so write name = "hello".

Can I define [a] after [a.b]?

Yes, once, since [a.b] creates a implicitly. Repeating [a] itself is an error.

Is a trailing comma allowed?

Yes in [ ] arrays, but not in { } inline tables under TOML 1.0.