Skip to main content
Back to Tools
Web Tools

TOML Formatter/Validator

Format, minify, and validate TOML content. Supports tables, arrays of tables, inline tables, all data types, and comments. Includes examples for Cargo.toml, pyproject.toml, and more. Runs entirely in your browser — your data never leaves your machine.

toml formatter validator config developer-tools

Published May 28, 2026

All interactive tools run entirely in your browser. Your data never leaves your device.

How It Works

Paste your TOML content and choose a mode: Format re-emits the TOML with consistent formatting, Minify removes blank lines and comments for compact output, and Validate checks syntax without modifying the content. The parser supports all common TOML features including tables, arrays of tables, inline tables, multi-line strings, and special numeric values.

Features

  • Three modes: format, minify, validate
  • Key sorting: optional alphabetical key ordering in format mode
  • 5 examples: basic config, Cargo.toml, pyproject.toml, arrays of tables, data types
  • Full TOML support: tables, arrays, inline tables/arrays, quoted keys
  • All data types: strings (basic, literal, multi-line), integers (decimal, hex, octal, binary), floats (including inf/nan), booleans, datetimes
  • Statistics: key count, table count, line count, input/output size
  • Round-trip safe: parse and re-emit preserves all values
  • Private: runs entirely in the browser — no data transmitted

Use Cases

  • Formatting Cargo.toml files for Rust projects
  • Validating pyproject.toml for Python packaging
  • Cleaning up TOML configuration files
  • Minifying TOML for embedded configs
  • Learning TOML syntax with interactive examples