JSON Repair: Fix Broken JSON With a Preview
JSON repair is a free OpenAnyDoc tool. Open or paste broken JSON and see, line by line, what Repair will change before you apply it.
Runs on your device: no upload, no sign-up, no ads How to check
Paste text instead
Pasted text stays in this tab and is never sent anywhere.
How it works: repair broken JSON
Open or paste the broken JSON
Choose a .json file, drop it on the page, paste the text into the box, or try one of the two samples.
Read the preview
A dialog lists what was found, such as “removed 1 trailing comma and quoted 1 key”, and lists the old lines with a minus sign, then the new lines with a plus sign.
Apply or cancel
Apply repair replaces the text in one step that Undo takes back. Cancel closes the preview and changes nothing.
Copy or download
Once the JSON is valid, copy it or download it as a .json file. Format tidies the indentation if you want it.

JSON repair: what it can't do
- Up to 10 MB per file
- Repair does not add missing brackets, braces or closing quotes, and cannot finish a file that was cut off; the error is then shown with its line for you to fix by hand.
- The preview shows up to 200 changed lines; Apply repair still makes every fix.
- Text inside quoted strings is left as it is, so a wrong value is not corrected.
- Files up to 10 MB.
Questions about repairing JSON
- Is my file uploaded?
- No, the broken JSON is never uploaded: it is read and repaired by your browser, on your device. Pasted text stays in this tab.
- Which JSON mistakes can Repair fix?
- Trailing and missing commas, single or curly quotes, keys without quotes, comments, the values True, False, None, NaN, undefined and Infinity, and invisible spaces. These are the usual results of writing JSON by hand or copying an object out of code or a chat.
- Will Repair change my data?
- It changes punctuation, not content: text inside strings and the digits of numbers are kept. Two changes do touch values: comments are removed, and NaN, undefined and Infinity become null because JSON has no such values. The preview shows every changed line before you agree.
- What if the JSON is still invalid after the repair?
- The page says so and marks the remaining error with its line and column. That happens with problems Repair leaves alone, such as a missing closing brace; fix that spot by hand and the document is checked again as you type.
- What happens when there is nothing to fix?
- When there is nothing to fix, no preview opens. For valid JSON the page says Repair found nothing to fix. When the JSON still has an error that Repair cannot fix, the page says so and Go to error takes you to the spot.
- Is there a size limit for repairing JSON?
- Files up to 10 MB. The preview lists the first 200 changed lines of a long repair.
Why it's private: your files never leave your browser
Many online file tools upload your file, so a copy of it leaves your device. OpenAnyDoc works the other way round: your browser reads the file and draws it on your screen. Nothing is uploaded, there is no account, and the file is gone from memory when you close the tab, so there is nothing for us to store, see or lose.