API Tools

TOML Formatter & Beautifier

Free online TOML Formatter, Validator, and Minifier. Format, beautify, and inspect TOML 1.0.0 configuration files with comment preservation and real-time syntax tree diagnostics.

Load Interactive TOML Presets:
TOML Specification & Formatting Options Formatting Options
Drop .toml file here
Supports UTF-8, .toml, .txt
Raw TOML Input Raw TOML
Formatted TOML Output Formatted
Ctrl + Enter to format instantly
Validation Result
Syntax check complete.
TOML 1.0.0
TOML Document Metrics & Structure Analysis
Characters 0
Lines 0
File Size 0 B
Root Keys 0
Tables 0
Array Tables 0
Inline Tables 0
Arrays 0
Strings 0
Numbers 0
Booleans 0
Date / Times 0
TOML Structural Hierarchy Viewer
Tree structure preview will appear here after parsing...

Comprehensive Guide to TOML 1.0.0 & Formatting

TOML (Tom's Obvious Minimal Language) is an elegant, human-readable configuration specification designed to map directly to associative arrays and hash tables without ambiguity. Unlike YAML which relies strictly on indentation or JSON which requires abundant braces and quotes, TOML uses familiar INI-style table syntax combined with strict data typing.

Standard Tables

Declared using [section] or nested [parent.child]. Groups key-value pairs into isolated namespaces without nested indentation traps.

Arrays of Tables

Declared using double brackets [[servers]]. Each repetition creates a new table item in an array, perfect for repeated service or product instances.

Native Date & Time

Native RFC 3339 support for Offset Date-Times, Local Date-Times, Local Dates, and Local Times without enclosing strings.

Frequently Asked Questions

TOML (Tom's Obvious Minimal Language) is a simple, unambiguous configuration file format designed to map seamlessly to a hash table. It is widely used in Rust (Cargo.toml), Python (pyproject.toml), Go, and modern DevOps tools. This TOML Formatter is a free, 100% client-side tool that beautifies, validates, minifies, and inspects TOML documents according to the official TOML 1.0.0 specification while preserving comments, data types, and table structures.

Yes. By default, our Concrete Syntax Tree (CST) engine preserves both full-line comments and trailing inline comments in their exact contextual places. You can optionally choose to strip comments by unchecking the "Preserve Comments" option in the formatting settings toolbar.

This tool fully supports the official TOML 1.0.0 specification. This includes all scalar types (decimal, hexadecimal 0x, octal 0o, binary 0b, floating-point numbers including inf and nan, booleans, offset date-times, local date-times, local dates, and local times), multiline basic (""") and literal (''') strings, dotted keys, quoted keys, inline tables, standard tables ([table]), and arrays of tables ([[table]]).

The TOML Minifier strips unnecessary blank lines, removes full-line comments, and removes extraneous whitespace around "=" and brackets while preserving required line breaks and structural separators. Crucially, our minifier automatically validates the resulting minified TOML through a parse-check to ensure data fidelity before displaying the output.

The structure viewer parses your TOML into an interactive visual DOM tree hierarchy. It clearly differentiates standard tables, arrays of tables, and key-value properties with color-coded data type badges ([String], [Integer], [Float], [Boolean], [DateTime], [Table], [Array]). You can search, expand, or collapse sections to quickly audit large configuration files.

Yes, 100%. All TOML parsing, formatting, validation, minification, and statistics calculation occur exclusively inside your web browser using client-side JavaScript. No configuration data is ever uploaded to external servers, logged, or shared.