Free TOML Editor
Check a Cargo.toml or pyproject.toml, reformat it into tidy tables, or see it as JSON, with errors pinned to the line.
What is a TOML Editor?
A TOML validator checks that a TOML file follows the TOML 1.0 specification, and a formatter rewrites it into a consistent layout. TOML is the configuration format of Rust’s Cargo.toml, Python’s pyproject.toml and many other tools, designed to map cleanly to a table of keys and values.
This tool parses your file with smol-toml, a parser that passes the official toml-test suite, then prints the data back as canonical TOML or as JSON. Dates and times are kept as dates. When the file is invalid, the error names the problem, such as a bare unquoted string or a table defined twice, and gives the line and column.
Key Features
Spec-Compliant Parsing
smol-toml follows TOML 1.0.0 and passes the toml-test conformance suite, so a file valid here is valid for Cargo, pip and other compliant tools.
Exact Error Positions
Every error reports the line and column where the parser stopped, plus what went wrong. You go straight to the broken line in your editor.
TOML to JSON in One Click
Switch to To JSON to see how nested tables, arrays of tables and inline tables turn into objects and arrays.
Canonical Layout
Pretty puts spaces around every equals sign and one blank line between tables, the layout most projects follow.
Dates Stay Dates
Offset date-times become ISO 8601 strings in JSON, while local dates such as 2026-11-01 keep their plain form instead of gaining a time.
Private by Default
Your file is parsed in the browser and never uploaded, so internal registry URLs and tokens in config files stay with you.
Perfect for everyone
- Rust developers editing Cargo.toml
- Python developers maintaining pyproject.toml
- Hugo and Netlify site owners
- DevOps engineers writing tool configuration
How to Use the TOML Editor
Paste the file, pick an output, fix what it flags.
Paste Your TOML File
Paste a whole Cargo.toml, pyproject.toml or netlify.toml, or just the section you are editing. Comments are fine in the input.
Choose Pretty or To JSON
Pretty rewrites the file in canonical TOML. To JSON shows the same data as JSON, which makes nesting and arrays of tables easy to check.
Fix the Line It Reports
A red footer comes with the line, column and reason. Fix that spot and the result appears again the moment the file parses.
Copy or Download It
Copy the result into your repository or download it as a file. The output drops comments, so merge it by hand if your original has notes.
Files Checked by This Tool
Each row is a file or snippet we pasted here, with the exact output or error message the tool returned.
“title="Navio" [owner] name="Ada" count=2”
“[tool.ruff] line-length = 100 select = ["E", "F"]”
“released = 2026-10-25T09:30:00Z due = 2026-11-01”
“[[servers]] name = "alpha" [[servers]] name = "beta"”
“title = Navio”
“[a] b = 1 [a] b = 2”
“a = 1 a = 2”
“x = "open”
“key = "line one line two"”
“= 1”
TOML Syntax at a Glance
TOML has a small grammar, and these entries cover nearly all of it, with the result each line produces.
Key = Value Pairs
Each line holds one key, an equals sign and a value. Keys are bare words of letters, digits, dashes and underscores, or quoted strings.
“Is line-length a valid bare key?”
Strings Always Need Quotes
Text values sit in double quotes, or single quotes for literal strings with no escapes. An unquoted word is an error, unlike in YAML.
“Is name = navio valid?”
Tables in Square Brackets
A header in single brackets starts a table, and every key below it belongs to that table until the next header.
“What does [owner] start?”
Dotted Keys and Dotted Tables
tool.ruff means the table ruff inside the table tool. Dotted keys like a.b = 1 create the same nesting on one line.
“What JSON does [tool.ruff] create?”
Arrays of Tables in Double Brackets
Each double-bracket header adds one more table to an array, which is how lists of servers or bins are written.
“What does [[servers]] twice make?”
Inline Tables in Braces
A whole small table can sit on one line in curly braces, as Cargo dependencies with features often do. Inline tables can’t span lines.
“Can an inline table span lines in TOML 1.0?”
Four Kinds of Date and Time
TOML has offset date-times, local date-times, local dates and local times. Only the offset form names an exact instant.
“Is 2026-11-01 a date or a string?”
Integers, Floats and Underscores
Numbers may contain underscores for readability, such as 1_000_000. Hex, octal and binary integers use 0x, 0o and 0b prefixes.
“What is 1_000 in JSON?”
Lowercase Booleans Only
true and false must be lowercase. True or yes are errors, which avoids YAML’s boolean surprises.
“Is enabled = True valid?”
Keys Are Defined Once
Defining the same key or table twice is an error, even with the same value. That rule catches copy-paste mistakes early.
“Can [a] appear twice?”
TOML Files You Probably Edit
TOML is the default config format for several major ecosystems.
Cargo.toml for Rust
Package metadata, dependencies with features and workspace members all live in Cargo.toml. A redefined dependency table is a common merge mistake.
pyproject.toml for Python
PEP 518 and PEP 621 put build settings and project metadata in pyproject.toml, and tools like Ruff, Black and pytest read their own [tool] tables there.
Hugo Site Configuration
Hugo sites often keep their config in hugo.toml, including menus written as arrays of tables.
netlify.toml
Netlify reads build commands, redirects and headers from netlify.toml, with each redirect as one [[redirects]] entry.
Rust Toolchain and Tool Configs
rust-toolchain.toml, rustfmt.toml and clippy.toml are small TOML files that pin versions and lint settings.
Poetry and uv Lock Settings
Python dependency managers read their own sections from pyproject.toml, so one stray quote can stop installs.
Gitea, InfluxDB and Telegraf
Many server tools use TOML for configuration, with long files where a duplicate table is easy to miss.
Fly.io and Deployment Manifests
fly.toml describes an app’s services and checks, so a syntax error blocks every deploy until it is fixed.
TOML Mistakes That Stop Builds
These are the errors behind most failed cargo build or pip install runs caused by config.
Unquoted Strings
Writing name = navio fails, because TOML has no bare strings. Quote every text value, including version numbers like "0.1.0".
Defining a Table Twice
Merged branches often leave two [dependencies] headers. Combine them into one table and keep a single entry per key.
Capitalised Booleans
True and FALSE are errors; only lowercase true and false are booleans. This bites people who move from Python settings.
Multi-line Text in Basic Strings
A line break inside a normal quoted string is an error. Use triple quotes for descriptions or scripts that span lines.
Mixing Dotted Keys and Headers
Defining tool.ruff.line-length as a dotted key and then opening a [tool.ruff] table can redefine the same table. Pick one style per table.
Trailing Commas in Inline Tables
Arrays may end with a comma, but inline tables in braces may not in TOML 1.0. Remove the final comma inside braces.
Losing Comments When Formatting
Reformatting rebuilds the file from data, so comments are dropped. Validate here, but merge layout changes by hand if your comments matter.
Check Nesting With To JSON
When a tool ignores a setting, convert the file to JSON and check the setting sits under the table the tool reads, such as tool.ruff and not ruff.
When to Reach for a TOML Validator
A quick parse saves a slow build failure.
Before Committing Config Changes
Paste an edited Cargo.toml or pyproject.toml and confirm it parses before CI does. It catches merge leftovers in seconds.
Debugging an Ignored Setting
Convert to JSON to check that a tool’s setting is nested where the tool looks for it.
Converting Config for Scripts
Turn a TOML config into JSON for jq, a CI step or an API that only accepts JSON.
Cleaning Up Hand-Written Files
Pretty normalises spacing around equals signs and between tables so the file reads consistently.
Reviewing Pull Requests
Paste a config file from a pull request to check it is valid TOML before approving the change.
Learning TOML Structure
See how tables, dotted keys and arrays of tables map to JSON objects and arrays side by side.
Checking Generated Config
Scripts and templates that write TOML can emit unquoted values or duplicate tables. Paste a generated file here before your pipeline ships it.
Moving a Config to TOML
Converting from YAML or JSON is mostly mechanical, apart from these differences.
Quote Every String
YAML lets you leave text unquoted, but TOML doesn’t. Add quotes around every text value as you convert, including version strings and hostnames.
Nested Objects Become Table Headers
A JSON object inside an object turns into a dotted table header such as [server.tls]. Deep nesting reads better as dotted keys inside one table.
Lists of Objects Become Arrays of Tables
A YAML list of mappings maps to repeated double-bracket headers, one per item. Short lists can also be written as an inline array of inline tables.
Null Has No TOML Equivalent
TOML has no null value, so leave the key out instead. Code reading the file must treat a missing key as the default.
Mixed-Type Arrays Are Allowed
TOML 1.0 permits arrays that mix types, which TOML 0.5 forbade. Older parsers may still reject them, so check which version your tool reads.
Compare the JSON Views
Convert both the old file and the new TOML to JSON and compare them side by side. If the data matches, the migration kept every value.