Fix invalid JSON
Paste it. Every problem gets a line and a fix, one click makes it valid JSON, and ⌘Z brings back the exact bytes you pasted.
What you get
- Reads the webhook sample as “Not valid JSON yet · 46 fixable” — 46 fixes in 7 kinds: 31 × quote unquoted key, 7 × remove trailing comma, 3 × single → double quotes, 2 × python false → json false, 1 × insert missing comma after value, 1 × python true → json true, 1 × python none → json null
- Unwraps a reply from a model — a sentence, a ```json fence, a sentence after — in 1 fix that says what it dropped; a reply cut at max_tokens is closed and marked where it stopped
- Rewrites only the lines it names; every other byte of your text is left exactly as pasted
- Counts the verdict down as you fix lines yourself — no button, it re-reads as you type
- Undo (⌘Z) restores the original text, byte for byte, after Fix all
- Knows 21 kinds of break — unquoted keys, single quotes, trailing commas, Python and JavaScript literals, comments, an unclosed bracket and the rest
What it will not do
- Guess at content. A missing value stays missing; the problems list says so, and nothing is invented to fill it.
- Reorder keys, reformat, or re-indent a line it did not fix.
- Use a language model. The fixes are rules, and the same input gives the same output every time.
- Send your text anywhere. The page is static and the engine runs in this tab — open the network panel and watch it stay empty.
The fixes, by name
- Unquoted keys
{id: 1, ok: true}{"id": 1, "ok": true}- Single quotes
{'name': 'Rin'}{"name": "Rin"}- Trailing commas
[1, 2, 3,][1, 2, 3]- Python literals
{"live": False, "next": None}{"live": false, "next": null}- A missing comma
{"a": 1 "b": 2}{"a": 1, "b": 2}- Comments
{"a": 1} // a note{"a": 1}- undefined and NaN
{"a": undefined, "n": NaN}{"a": null, "n": null}- An unclosed bracket
{"a": [1, 2}{"a": [1, 2]}
The sample
What the first sample opens — a real file, not an illustration written for this page.
in VS Code
⌘. on the broken line lists its fix and “Fix all N”; ⇧⌥. applies the line’s fix with no menu; Fix All applies every fix — on save too, if you write that one setting.
Questions
Which JSON errors does it fix?
Unquoted keys, single-quoted strings, trailing commas, a missing comma between members, Python and JavaScript literals (True, False, None, undefined, NaN), comments, an unclosed bracket — 21 kinds in all, each named on its line before anything changes.
Is my JSON uploaded?
No. There is no server that reads it: the page is static and the engine runs in your browser tab. Nothing you paste is sent anywhere.
What if a problem cannot be fixed?
It stays on the list with its line and the reason. Fix all applies the fixes it can and leaves that line exactly as you wrote it.
Can I fix JSON pasted out of a Python log?
Yes — single quotes, True, False and None are each one fix. The Python dict page shows that case on its own.