TOML Formatter & Validator
Paste Cargo.toml or any TOML v1.0 file. Errors name the line. Formatting rewrites indentation and drops comments.
Parsing and conversion on this page run in your browser.
How to use
Example
[package]
name = "demo-lib"
version = "0.1.0"
edition = "2021"
description = "Sample library manifest"
license = "MIT"
[dependencies]
serde = "1"
[features]
default = ["std"]
std = []
FAQ
Does format keep comments?
No. The formatter parses the document and writes it back, so comments are removed. Invalid input is left unchanged.
Does the indent option change TOML?
TOML is written with table headers, not indented blocks. Indent applies when you convert to JSON or YAML.
What does Ctrl+S do?
Ctrl or Cmd+S formats the buffer and does not open the browser save dialog.
How do comment tools work?
Comment / uncomment apply to the selected lines (or the cursor line). Strip all comments is heuristic and asks for confirmation; Format also drops comments via parse → stringify.