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.

Everything runs in your browser — your config never gets uploaded anywhere, which matters when the file in question has API tokens or DSN strings in it. If you want a second opinion on the output, you can run the result through another <a href="https://www.jsontotable.org/toml-formatter" target="_blank" rel="noopener">online TOML formatter</a> to cross-check that an independent parser agrees it's clean.

How to Use the TOML Fixer

Three steps. Each one matches an actual button on the page.

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 follows the official TOML language rules when deciding what counts as valid output — so the result will parse with `toml-rs`, `tomli`, `go-toml`, or any other compliant library.

2

Click Fix TOML!!

Hit the green Fix TOML!! button in the toolbar. The fixer walks your input, repairs the obvious stuff (mismatched quotes, dangling commas, broken table headers like `[server.production]`), and writes the corrected TOML to the right panel. You'll see a "Fixing TOML..." indicator while it works — most files finish in under a second.

3

Review Fixed Output

The right panel shows the repaired TOML. Values stay exactly as you wrote them — only the structure gets cleaned up. Copy it back into `pyproject.toml`, `Cargo.toml`, or `/var/log/app.log` rotation config, whatever you were editing. Nothing leaves your machine.

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 stored or logged?

No. Everything runs locally in your browser. We don't upload your file, we don't see it, and there's no server-side log of what you fixed. Safe to use on configs that contain credentials.

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?

Yes. The fixer only touches structure — string values, numbers, booleans, and datetimes come out byte-for-byte the same as you put them in. If you typed a version as `"1.2.3"`, you get `"1.2.3"` back, not `1.2.3` parsed as a number.

What if the TOML is too broken to fix?

If the structure is genuinely beyond saving — say, the entire file is one long unterminated string — the fixer will repair what it can and surface the rest. You'll usually still get a usable starting point that's closer to valid than what you pasted in.

Will the fixed output work with my parser?

Output targets the TOML 1.0 grammar, so it works with `toml-rs`, `tomli`/`tomllib` in Python 3.11+, `go-toml`, and anything else that follows the spec. If you want a third-party sanity check, run the result through a second parser as well — two passes catches more than one.

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: