TOML Validator & Formatter
Paste your TOML to validate, format, and convert it. Everything happens in your browser — your data stays private.
Validation results will appear here...
About TOML
TOML (Tom's Obvious Minimal Language) is a configuration file format that aims to be easy to read due to its clear semantics. Created by Tom Preston-Werner, co-founder of GitHub, TOML maps unambiguously to a hash table and is designed to be parsed into data structures in a wide variety of languages.
TOML is widely used in the Rust ecosystem (Cargo.toml), Python packaging (pyproject.toml), Hugo static site generator, and many other tools. This validator parses your TOML according to the TOML v1.0 specification and reports errors with line numbers.
Features
- Validate TOML syntax with detailed error messages and line numbers
- Format and prettify TOML with consistent spacing and structure
- Convert TOML to JSON for use with APIs and other tools
- Supports strings (basic and literal), integers, floats, booleans, dates/times, arrays, tables, inline tables, and arrays of tables
- Load common templates: Cargo.toml, pyproject.toml, Hugo config, and more
- Download output as .toml or .json files
- 100% client-side — your data never leaves your browser
TOML vs YAML vs JSON
| Feature | TOML | YAML | JSON |
|---|---|---|---|
| Comments | Supported (#) |
Supported (#) |
Not supported |
| Readability | Clear, explicit sections | Indentation-based, compact | Verbose with braces |
| Date/Time types | Native support | Tag-based | Strings only |
| Nesting style | Dotted keys / [table] headers | Indentation | Braces and brackets |
| Designed for | Configuration files | Data serialization | Data interchange |
| Ambiguity | Very low | Can be ambiguous | None |
| Common use cases | Cargo.toml, pyproject.toml, Hugo | Docker, Kubernetes, Ansible | APIs, web services |
| File extensions | .toml |
.yaml, .yml |
.json |
TOML Syntax Quick Reference
| Syntax | Example | Description |
|---|---|---|
| Key-value pair | name = "value" |
Basic assignment with = |
| Bare key | my-key_1 = true |
Letters, digits, dashes, underscores |
| Quoted key | "special key!" = 42 |
Any Unicode key in quotes |
| Dotted key | server.host = "localhost" |
Nested key shorthand |
| Table | [database] |
Section header (creates object) |
| Inline table | point = { x = 1, y = 2 } |
Compact table on one line |
| Array of tables | [[products]] |
Each instance adds to an array |
| Basic string | "hello\nworld" |
Double quotes, escape sequences |
| Literal string | 'C:\path\to\file' |
Single quotes, no escaping |
| Multi-line string | """ |
Triple-quoted basic string |
| Integer | port = 8080 |
Also hex, octal, binary |
| Float | pi = 3.14159 |
Also inf, nan |
| Boolean | enabled = true |
Only true / false |
| Date | date = 2024-01-15 |
RFC 3339 format |
| Array | tags = ["web", "api"] |
Comma-separated in brackets |
| Comment | # This is a comment |
Hash to end of line |