Formatters / LOCAL TOOL

TOML Formatter & Validator

Parse and format TOML 1.0 locally with explicit syntax errors.

Runs locally — input is never uploaded
Paste or type TOML

WHAT IT DOES

Make TOML readable without handing it to a server.

Parse and rewrite TOML 1.0 in the browser so tables, arrays, inline tables, strings, dates, and numbers get a consistent readable layout. Formatting is also validation: malformed syntax is reported with the parser's diagnostic instead of being copied into a result that only looks plausible.

Why use it?

Use it to normalize TOML data when a consistent rewrite matters more than preserving the original comments and layout.

How to use this tool

  1. Paste TOML and format it, resolving any parser diagnostic first.
  2. Review the rewritten tables, dates, and arrays before copying. Keep a copy of the original: comments are not preserved.
  3. Validate application-specific requirements separately. A valid TOML document can still name settings that its consumer does not support.

Details and limitations

  • The parser handles TOML 1.0 data types and table forms rather than treating TOML as an INI file with a few regular expressions.
  • Dates and times remain TOML date values during parsing and are emitted in TOML form.
  • Comments are not preserved by the bundled parser/stringifier; the status message says this instead of implying a lossless source rewrite.
  • Input is bounded before parsing so a pathological document cannot make the tab spend unbounded work in formatting.

COMMON QUESTIONS

TOML Formatter questions

Does this support TOML 1.0?
Yes. The bundled parser supports the TOML 1.0 data model, including tables, arrays, inline tables, strings, numbers, booleans, and date/time values.
Will comments stay in the formatted file?
No. The parser used for this first version produces data and a canonical TOML serialization, so comments and original presentation are not available to preserve. The status note calls that limitation out.
Does formatting validate my application schema?
No. It validates TOML syntax and rewrites the data; application-specific keys and constraints need the application or its own schema tool.