TOML Formatter & Validator — Beautify/Lint Online Validate and tidy TOML config files.
100% offline
Input114 chars · 9 lines
Output115 chars
Formatted · 10 lines
title = "Anvil Config"

[owner]
name = "Ada Lovelace"
joined = 2026-06-18

[server]
host = "localhost"
port = 8080

About TOML Formatter & Validator — Beautify/Lint Online

TOML (Tom's Obvious, Minimal Language) is the config format behind Rust's `Cargo.toml`, Python's `pyproject.toml`, and countless app and tool settings. It's designed to be easy to read — but hand-edited TOML drifts: inconsistent spacing, scattered tables, mixed inline and multi-line styles, and the occasional misplaced bracket that breaks the parse.

This free TOML formatter and validator tidies all of that. Paste your config and it normalizes tables, arrays, and inline tables into one consistent layout, or pinpoints the exact line of a syntax error with a clear message. It's a strict, spec-compliant TOML validator that catches problems before they reach your build.

Everything runs entirely in your browser. Your config — which often holds secrets, tokens, and internal paths — never leaves your device.

Features

  • Normalize tables, arrays, and inline tables into a consistent layout
  • Validate against the TOML spec with clear, line-numbered error messages
  • Round-trips real configs: Cargo.toml, pyproject.toml, dates, and nested tables
  • Fully offline — nothing is uploaded

How to use

  1. Paste your TOML into the input pane.
  2. Click Format to reflow it, or Validate to check it without changing anything.
  3. Read the status line — "Valid" with a table count, or a line-numbered parse error.
  4. Copy the formatted TOML from the output pane.

Frequently asked questions

What does formatting actually change?

Formatting re-parses your TOML and re-emits it in a canonical style: consistent spacing around equals signs, normalized inline tables and arrays, and predictable key ordering. The data is identical — only the layout is standardized.

Will it preserve my comments?

No. Formatting works by parsing the TOML into data and re-serializing it, which discards comments and blank lines since they are not part of the data model. Use Validate if you only want to check syntax without rewriting the file.

Does it handle dates and nested tables?

Yes. It supports the full TOML spec — offset and local datetimes, arrays of tables, inline tables, and deeply nested structures all round-trip correctly.

Is my config sent to a server?

No. Parsing, validating, and formatting all happen locally in your browser. Nothing about your TOML ever leaves your device.

Everything runs locally in your browser — your input is never uploaded.