TOML formatting and JSON conversion
This TOML formatter cleans up configuration files and ensures the syntax is strictly valid. You can format the input as standardized TOML, or convert it to JSON to check how the parser interprets data types and deeply nested tables.
Because TOML is widely used in modern language tooling (like Rust’s Cargo or Python’s Poetry) but less natively supported in raw browser environments, converting TOML examples into JSON is helpful when your web API or JavaScript code requires JSON objects.
Indentation and minification
When converting TOML to JSON, you can format the output with spaces or tabs. You can also minify the output entirely, which collapses the JSON into a single compact line—useful for passing data via environment variables or minimizing payload sizes.
(Note: Custom indentation and minification apply to JSON output only, as standard TOML relies on its own formatting rules without deep block indentation.)
Key sorting and validation
Enable key sorting to alphabetize the keys inside every table and nested object. This creates a stable, predictable order that minimizes noisy diffs when committing large configuration files to version control.
The tool parses your input live using smol-toml. If the document contains syntax errors—such as an unclosed string, an invalid date format, or a duplicate table definition—an error badge appears instantly. The parser will indicate the exact line and column where the error occurred, letting you quickly isolate and fix the typo.