TOML Formatter & Validator

Format, beautify, minify, sort, and validate TOML files. Perfect for Cargo.toml, pyproject.toml, Hugo config, and any TOML configuration file.

TOML Syntax Reference

ConstructSyntaxDescription
Key-Valuekey = "value"Basic assignment with = sign
Table[table]Section header / object
Dotted Keyserver.port = 8080Nested key shorthand
Array of Tables[[items]]Repeated section creates array
String"hello"Basic string with escapes
Literal String'no\escapes'Single-quoted, no escapes
Multiline String"""...."""Triple-quoted multiline
Integerport = 8080Decimal, hex (0x), octal (0o), binary (0b)
Floatpi = 3.14159IEEE 754 float, inf, nan
Booleanenabled = truetrue or false (lowercase)
Date-Time2024-01-15T10:30:00ZRFC 3339 datetime
Arrayports = [80, 443]Comma-separated list in brackets
Inline Table{k = "v"}Single-line table in braces
Comment# commentHash to end of line

Frequently Asked Questions

What is TOML?

TOML (Tom's Obvious Minimal Language) is a configuration file format designed to be easy to read and write. It's used by Rust's Cargo (Cargo.toml), Python's pyproject.toml, Hugo, and many other tools. It maps clearly to a hash table structure.

What's the difference between TOML and YAML?

TOML uses explicit section headers ([table]) and = for assignment, while YAML uses indentation. TOML doesn't have the 'Norway problem' (no implicit type coercion — booleans must be true/false). TOML is simpler but less flexible for deeply nested data. YAML supports anchors and aliases; TOML does not.

What does 'Align = signs' do?

When enabled, all key-value pairs within the same section are padded so their = signs line up vertically. This improves readability for tables with many keys of different lengths (common in Cargo.toml dependencies).

Is my data safe?

Yes. All formatting, sorting, and validation happens entirely in your browser using JavaScript. No data is sent to any server. Your TOML files never leave your machine.