JSONWeave / Repair broken JSON
Repair broken, truncated and malformed JSON
Most JSON tools stop at "Unexpected token". JSONWeave keeps parsing, lists every problem it finds, shows you the repaired document and only changes your text when you click Apply fixes.
Open the repair toolWhy JSON breaks in practice
Strict JSON is unforgiving: one stray comma or missing bracket makes the whole document unparseable. Real documents break for ordinary reasons.
- A log line or API response was cut off, so the closing braces and brackets never arrived.
- JSON was copied from a JavaScript object, a config file or documentation, with unquoted keys, single quotes or trailing commas.
- A hand edit removed a comma, a colon or a value.
- A string was never closed, so everything after it is swallowed.
What JSONWeave detects and repairs
JSONWeave uses a tolerant parser that never throws on bad input. It builds the best document it can and records what looked wrong, so the editor, tree and diagnostics keep working on a broken file.
- Trailing commas
- Unquoted property names
- Single-quoted strings
- Unterminated strings
- Missing commas, colons and values (a missing value becomes null)
- Missing closing braces and brackets, the usual result of truncated JSON
- Duplicate keys, reported so you can decide which one is right
- Comments, which are tolerated while parsing and dropped from the repaired output
Example: a truncated API response
This response was cut off inside an array. JSONWeave reports the missing closing bracket and brace and previews the completed document.
{
"user": "ada",
"roles": ["admin", "editor"{
"user": "ada",
"roles": [
"admin",
"editor"
]
}What repair cannot do
Repair completes structure. It cannot recover data that never arrived. If a response was cut off in the middle of a value, the repaired document holds only what was received, and a missing value becomes null. Read the preview before you apply it.
How the repair workflow works
- Paste or open the broken JSON. It loads even when invalid.
- Open Repair JSON from the toolbar or the command palette.
- Read the list of issues.
- Check the preview of the repaired document.
- Click Apply fixes to replace the editor contents, then format, inspect or copy the result.
Frequently asked questions
Can JSONWeave repair incomplete JSON?
It can close unfinished objects, arrays and strings, so truncated JSON becomes a valid document. It cannot restore values that were never received.
Does it change my JSON without asking?
No. The repaired result is shown as a preview and your document changes only after you apply the fixes.
Is my JSON uploaded to a server?
No. Parsing and repair run in your browser. The only network request the app makes is the one you start with Open from URL.
Related
Ready to try it on your own JSON?
Open the workspace, paste or drop a file, and nothing leaves your browser.
Open the repair tool