All Over Tools logo
Tool Combiner
Analyze Tools Clean Tools Compare Tools Convert Tools Data Validation Extract Tools Format Tools Generate Tools Organize Tools Transform Tools
Image Tools Video Tools Audio Tools Subtitle Tools Font Tools
Analyze Tools Clean Tools Compress Tools Convert Tools Edit Tools Extract Tools Generate Tools Merge Tools Organize Tools Redact Tools Repair Tools Split Tools
Analyze Tools Clean Tools Compare Tools Convert Tools Extract Tools Generate Tools Merge Tools Transform Tools Validate Tools
Business Calculators Construction Calculators Date And Time Calculators Education Calculators Financial Calculators Food Calculators Health Calculators Math Calculators Science Calculators Sports Calculators Statistics Calculators
Blog About Us Contact Us

TOML Validator and Formatter

Paste or upload a TOML file, check its syntax with exact line and column error locations, then format valid input using your chosen presentation rules and export it without changing any value.

Drop a TOML file here

or

TOML, TXT

How to validate and format TOML

Paste TOML into the input area, or use Drop a TOML file here to load a file. Choose the presentation options; usable input is checked and formatted automatically, and the preview appears only when processing finishes with no errors.

Input methods and file-loading behavior

You can paste text, drop a file onto Drop a TOML file here, or click browse files. The file picker accepts .toml and .txt files.

When a loaded file is longer than 300,000 characters, the visible textarea shows a truncated copy and a notice. The full file text remains in the internal processing variable and is used when you validate it.

Click Clear to remove the current input and hide the result workspace.

Formatting controls

Set these controls before processing, or change them after a result exists:

  • Indentation: choose 2 spaces, 4 spaces, Tab, or None.
  • Indent keys under table headers: change the indentation of keys and comments below table headers.
  • Space around "=": control spacing around assignments.
  • Max consecutive blank lines: keep 0, 1, or 2 blank lines.
  • Blank line before each table header: insert a blank line before table headers.
  • Quote style: choose Preserve as written, Prefer double-quoted, or Prefer literal, where possible.
  • Array layout: choose Preserve as written, Always inline (single line), or Always one element per line.
  • Line endings: choose LF (Unix / Mac) or CRLF (Windows).

Changing a formatting control automatically reprocesses usable input. Editing the textarea also validates and formats the current input automatically.

Table order and value preservation

Table order offers Preserve declaration order and Canonical (shows safety warning). The canonical choice displays a warning, but the tool does not reorder declarations. Comments and declaration order are preserved by default.

For a clean result, the formatter preserves parsed values. Numbers, booleans, dates and times, and multiline strings are not rewritten. Quote-style changes apply only where the decoded string value can be preserved.

Errors, preview, and exports

A parser failure may produce one syntax error, such as an unterminated string or missing assignment. If parsing succeeds, semantic checks can add conflicts such as duplicate keys or table/key collisions. Errors include line and column information. The total count is shown, while the visible list is limited to the first 1,000 entries.

The stats area reports Tables, Arrays of tables, Key/value pairs, Comments, and Errors. When errors remain, the preview is blank and says Fix all reported errors to see a formatted preview. Export TOML stays disabled until the error count reaches zero. Export errors downloads toml-validation-errors.csv with line, column, and message fields.

How to use the tool

  1. Paste TOML or load it with Drop a TOML file here or browse files.
  2. Set the formatting controls, including Table order.
  3. Wait for automatic validation and formatting.
  4. Review the stats, any errors, the safety warning, and the formatted preview.
  5. Fix source errors and the current input is validated again automatically.
  6. Click Export TOML after errors reach zero, or click Export errors to download the CSV report.

Limits and processing notes

This tool reformats presentation; it does not repair invalid values, rewrite configuration semantics, or convert TOML to JSON. Its parser is custom, so the implementation does not establish complete TOML specification compliance. Date and time values are recognized by pattern, without evident range validation.

The implementation performs parsing, formatting, and file downloads in the browser; it contains no tool-data upload call. This page does not document a general server-upload policy, account policy, or service-wide usage limit.

Frequently Asked Questions

How is this different from a TOML to JSON converter?

This tool stays in TOML. It checks supported syntax and changes presentation - indentation, spacing, blank lines, quote style where value-preserving, array layout, line endings, and comments/order. A TOML to JSON converter changes the representation of the data, which this tool does not do.

Will this tool change my values?

For a clean result, parsed strings, numbers, booleans, dates and times are carried through without rewriting their values. Quote style changes only when the decoded string value can be preserved; multiline strings, numbers, booleans and dates are not rewritten.

What does canonical table ordering do?

Selecting Canonical (shows safety warning) displays a warning that reordering table declarations can change or obscure meaning in TOML, for example with arrays of tables or implicit super-tables. The tool keeps the original declaration order.

Can I export a file that has errors?

No. Export TOML is disabled while reported errors remain. Fix the source TOML and click Validate & Format again before exporting.

Related Tools

2 views