Paste your broken TOML here and click "Fix TOML!!" to repair itEnter Invalid TOML

What is the TOML Fixer?

You hand-edit a `Cargo.toml`, save, run `cargo build`, and the parser yells at you about an unterminated string on line 47. We've all been there. This tool takes a broken TOML file, figures out what went wrong, and gives you back something the parser will actually accept. Paste it in, hit the button, copy the fixed version back into your repo. The format itself is defined by the TOML 1.0.0 spec — the fixer aims to produce output that round-trips through any compliant parser.

The most common breakage we see comes from manifest files: a stray quote in `[dependencies]`, a missing closing bracket on an inline table, or a header like `[server.production]` that got typed as `[server.production` with no closing brace. The fixer handles all of those. It works on any TOML — Cargo manifests, pyproject.toml (PEP 518), Hugo config, Black's configuration, or anything else built on the format.

How it works: when you hit Fix, your TOML is sent to our server and repaired by an AI model, and the result comes straight back. We don't store it. That also means you should strip API tokens and DSN strings before pasting, as you would with any online tool. If you want a second opinion on the output, run it through another online TOML formatter to check an independent parser agrees it's clean.

How to Use the TOML Fixer

Three steps: paste, hit Fix, check what came back.

1

Paste Broken TOML or Load Sample

Drop your invalid TOML into the left editor. Hit Sample TOML if you want to see the kinds of breakage the fixer handles — the sample includes a missing quote, a header without a closing bracket, and a trailing comma in an inline table. Real-world example of the kind of input we see:

title = My Server
[server.production
port 8443
log_path = "/var/log/app.log"
allowed = ["a", "b",]

The fixer is asked to return output that follows the TOML 1.0 rules, so it should parse with toml-rs, tomli or go-toml. Check it with a validator before you commit.

2

Click Fix TOML!!

Hit the green Fix TOML!! button in the toolbar. Your TOML is sent to our server, where an AI model repairs mismatched quotes, dangling commas and broken table headers like [server.production, and the corrected TOML lands in the right panel. A "Fixing TOML..." overlay shows while it works.

3

Review Fixed Output

The right panel shows the repaired TOML. The model is told to leave values alone, but compare it with your original anyway, then copy it back into pyproject.toml, Cargo.toml or whatever you were editing. The TOML Validator will confirm it parses.

When You'd Actually Use This

Cargo.toml debugging

You added a dependency by hand, the version string got an extra quote, and now `cargo check` won't even start. Paste the manifest in, get a clean version back, keep shipping. The output stays compatible with whatever Rust toolchain you're running.

pyproject.toml fixes

Editing `[tool.black]` or `[tool.ruff]` and accidentally killing the `[build-system]` table is a classic. The fixer rebuilds the table headers and re-balances any inline tables that got truncated mid-edit.

Hugo and static-site config

Hugo's `config.toml` has nested tables that are easy to get wrong, especially after copy-pasting from a tutorial. The fixer normalises the headers and lets you ship without staring at line numbers.

Recovering pasted snippets

TOML pasted out of Slack, GitHub issues, or chat clients sometimes loses quotes or picks up smart-quote characters. Run it through the fixer and you get back ASCII-clean TOML that any parser will accept.

Common Questions

Is my TOML sent anywhere or stored?

No, we don't store it, but it does leave your browser: the fix runs on our server through an AI model, and the result is sent straight back. Don't paste configs with live credentials in them; replace tokens and passwords with placeholders first.

What kinds of errors can it actually fix?

Missing or unbalanced quotes around strings, broken table headers (`[server.production` with no closing bracket), unterminated inline tables, trailing commas where TOML doesn't want them, smart-quote characters that snuck in from a copy-paste, and inconsistent indentation inside arrays. The format rules it follows match the TOML 1.0 specification.

Does it preserve my values?

It's instructed to. The model is told to fix structure only and keep strings, numbers, booleans and datetimes as you wrote them, so "1.2.3" should stay a quoted string. An AI model can't promise that every time, though, so diff the result against your input before you commit it.

What if the TOML is too broken to fix?

If the structure is genuinely beyond saving (say the whole file is one long unterminated string), you'll get an error or a partial repair. Fix the worst spot by hand and run it again; the second pass usually gets the rest.

Will the fixed output work with my parser?

It should, since the model is asked for TOML 1.0 output, which toml-rs, tomli/tomllib in Python 3.11+ and go-toml all read. Because it's generated by a model, check it: paste it into the TOML Validator or load it with your own parser.

Can I use it on really large files?

There's a 64 KB limit on input. That's plenty for any sane Cargo.toml or pyproject.toml — if you're hitting that ceiling, your config has bigger problems than syntax errors.

Other TOML Tools You Might Need

Fixing broken TOML is one piece. Here are the others that pair with it: