Free online tools to generate, calculate,
convert, format, encode, and play.
 

TOML Formatter & Validator

Format, validate, and minify TOML files with syntax highlighting and error reporting. All processing happens in your browser.


Drop a .toml file here or
The result updates as you type.
Status: -
Size: -
Lines: -
Tables: -
Keys: -

How It Works

This tool parses your TOML input using a client-side parser that follows the TOML v1.0.0 specification. All processing happens entirely in your browser — no data is sent to any server.

  • Format — parses and re-serializes TOML with consistent indentation and spacing
  • Minify — removes comments and unnecessary whitespace to produce compact output
  • Validate — checks syntax and reports the exact error position if invalid
  • Sort Keys — alphabetically sorts keys within each table section
  • Syntax Highlighting — color-codes tables, keys, strings, numbers, booleans, and dates

About TOML

TOML (Tom's Obvious Minimal Language) is a configuration file format that is easy to read due to its clear semantics. It is designed to map unambiguously to a hash table and is used by tools like Cargo (Rust), Poetry (Python), and Hugo.

TOML Syntax Rules

  • Key/value pairs: key = "value"
  • Tables (sections): [table]
  • Array of tables: [[array]]
  • Strings: basic "hello" or literal 'hello'
  • Numbers: integers 42, floats 3.14, hex 0xDEAD
  • Booleans: true or false
  • Dates: 1979-05-27T07:32:00Z
  • Inline tables: { key = "value" }
  • Arrays: [1, 2, 3]
  • Comments start with #

Common Use Cases

  • Rust/Cargo — Cargo.toml defines package metadata and dependencies
  • Python — pyproject.toml for project configuration (PEP 518)
  • Hugo — static site generator configuration files
  • Git — .gitconfig uses a TOML-like format
  • CI/CD — various pipeline configurations use TOML

Embed This Util

You can embed this util on your own site as a widget. Adding ?embed=1 to the URL loads a compact version with just the tool itself; no header, menu, or documentation. Paste this snippet into your HTML:


    

Copy snippet Adjust the height to taste.



Feedback

Help us improve this page by providing feedback, and include your name/email if you want us to reach back. Thank you in advance.


Share with