Format, validate, and convert TOML β JSON in-browser. No data is sent to any server.
| Type | Example | Notes |
|---|---|---|
| String (basic) | name = "Alice" | Supports \n, \t, \uXXXX escapes |
| String (literal) | path = 'C:\Users\Alice' | No escape processing β use for regex, paths |
| Multi-line string | desc = \"\"\" Line 1 Line 2\"\"\"`` | Opening newline trimmed |
| Integer | count = 42 hex = 0xFF bin = 0b1010 | Underscores allowed: 1_000_000 |
| Float | pi = 3.14159 sci = 5e22 inf = inf | nan also valid |
| Boolean | debug = true verbose = false | Always lowercase |
| Offset Date-Time | created = 1979-05-27T07:32:00Z | RFC 3339 / ISO 8601 |
| Local Date | date = 2024-01-15 | No time, no timezone |
| Array | tags = ["rust", "config"] | Mixed types allowed; multi-line OK |
| Inline Table | point = {x = 1, y = 2} | Must be on a single line |
| Table | [server] host = 'localhost' | Maps to nested object |
| Array of Tables | [[users]] name = 'Alice' | Creates an array of objects |
| Feature | TOML | JSON | YAML |
|---|---|---|---|
| Comments | β | β | β |
| Trailing commas | N/A | β | N/A |
| Native dates | β | β | β |
| Multi-line strings | β | β (escape \n) | β |
| Implicit type coercion | β | β | β (risky) |
| Human readability | High | Medium | High |
| Machine readability | High | High | Medium |
| Use case | Config files | APIs / data exchange | Config / automation |
TOML (Tom's Obvious, Minimal Language) is a configuration file format designed to be easy to read due to obvious semantics. It maps unambiguously to a hash table and is designed as an alternative to YAML and JSON for configuration files. TOML is used by Rust's Cargo, Python's Poetry, and many other tools.
Unlike JSON, TOML supports comments, multi-line strings, and has native date/time types. Unlike YAML, TOML has explicit, unambiguous syntax β there are no surprising implicit type coercions or indentation pitfalls. TOML is generally preferred for configuration files while JSON is preferred for data exchange APIs.
A TOML table is defined with [table.name] syntax and maps to a nested object. An array of tables uses [[array.name]] (double brackets) and creates an array of objects. Inline tables use {key = value} syntax for compact representations. Tables support arbitrary nesting for hierarchical configuration.
TOML supports: String (basic and literal/raw), Integer (decimal, hex 0x, octal 0o, binary 0b), Float (including inf and nan), Boolean (true/false), Offset Date-Time (RFC 3339), Local Date-Time, Local Date, Local Time, Array (mixed types allowed), and Table/Inline Table.