Browser-based · Explainable JSON repair
Repair broken JSON. Review every change.
Fix malformed JSON from APIs, logs, ChatGPT, Claude, Gemini and hand-edited files. Motifuse identifies each problem, proposes a deterministic correction and shows the exact evidence before you copy the result.
Explainable JSON repair
Repair, review and export
LLM-aware, not LLM-powered. Repair is deterministic and runs in this browser tab — the same engine that powers JSON Formatter's quick repair, with the full review around it.
Configure repair
Load a document, choose how tolerant the engine should be, then run it.Sample
Load a sample document
More
All actions
Take the result
Check
Document
Review
Everything above, plus what arrives wrapped around model output.
What it changes
- Strips Markdown fences, explanatory sentences, `<json>` tags and JSONP or callback wrappers.
- Unwraps a JSON document that was encoded inside a string — the shape tool-call arguments arrive in.
- Normalises Python True, False and None; raises undefined, NaN and Infinity as decisions rather than guessing.
- Recovers end-of-stream truncation and offers NDJSON and multiple-candidate handling.
Repair result
Nothing to report yetNothing is uploaded. The document is scanned and repaired in this browser tab.
Review changes
Every edit, where it landed and why — accept or reject each one.- Runs locally
- No account required
- Export available
- Deterministic, not AI
Simple process
How JSON Repair Pro works
01 Add malformed JSON
Paste, drop a file or load a sample. Up to 15MB, read on your device.
02 Detect and classify issues
A string-aware scanner matches each problem to a named rule and a position.
03 Review proposed repairs
Line, column, token, replacement, rule and confidence tier — per change.
04 Copy or export valid JSON
Take the document, or a repair report, an edit manifest or retry feedback.
Built for broken JSON
Deterministic repair.Reviewable evidence.
LLM-aware, not LLM-powered. The engine knows the shapes model output arrives in because those are the shapes that break — not because your document is sent anywhere to be interpreted.
Supported repair categories
Every rule, named.
Each change the engine makes cites one of these. A repair tool that cannot say which rule produced a change is describing a diff, and a diff cannot tell you whether a value was deliberately normalised or accidentally rewritten.
Syntax & punctuation
Commas, colons, separators and the tolerant grammars.
12 rules
Quotes & keys
Property names, delimiters, escapes and invisible characters.
13 rules
LLM & wrappers
Fences, prose, callbacks, stringified documents and NDJSON.
10 rules
Truncation & ambiguity
Unclosed containers, cut-off strings and values with no single reading.
14 rules
View all 49 repair rules
Wrappers and surrounding content
8 rules
- Markdown code fence — Safe
- Explanatory text around the JSON — Review recommended
- JSONP callback wrapper — Safe
- XML-style tag wrapper — Safe
- Parentheses around the root value — Safe
- Server-sent-events `data:` prefix — Safe
- JSON encoded inside a string — Review recommended
- Selected one JSON candidate — Review recommended
Quotes, keys and escapes
9 rules
- Unquoted property name — Safe
- Single-quoted property name — Safe
- Single-quoted string — Safe
- Typographic quotation marks — Safe
- Template-literal string — Review recommended
- Mismatched string delimiter — Review recommended
- Unescaped double quote in a string — Review recommended
- Line break inside a string — Safe
- Invalid escape sequence — Review recommended
Commas and colons
7 rules
- Trailing comma — Safe
- Repeated comma — Review recommended
- Leading comma — Safe
- Missing comma between members — Review recommended
- Missing colon after a property name — Review recommended
- Equals sign used as a separator — Safe
- Semicolon used as a separator — Safe
Containers and truncation
6 rules
- Unclosed object — Review recommended
- Unclosed array — Review recommended
- Extra closing brace — Review recommended
- Extra closing bracket — Review recommended
- Unclosed string at the end of the document — Ambiguous
- Incomplete value at the end of the document — Ambiguous
Non-JSON literals
8 rules
- Python-style boolean — Safe
- Python `None` — Safe
- JavaScript `undefined` — Ambiguous
- NaN or Infinity — Ambiguous
- Bare identifier used as a value — Ambiguous
- Constructor call used as a value — Ambiguous
- Ellipsis placeholder — Ambiguous
- Concatenated strings — Review recommended
JSON5 and JavaScript syntax
5 rules
- Comment — Safe
- Leading plus on a number — Safe
- Hexadecimal number — Safe
- Number written in a form JSON rejects — Safe
- Multi-line string continuation — Review recommended
Document format
2 rules
- Newline-delimited JSON — Review recommended
- Duplicate object key — Ambiguous
Encoding and invisible characters
4 rules
- Byte-order mark — Safe
- Invisible character — Safe
- Non-breaking space in structural position — Safe
- Raw control character in a string — Safe
Confidence tiers: Safe Review recommended Ambiguous
Errors we repair
See the repair before you trust it.
Each of these runs through the same engine as the workspace above, right now, on this page. Open one to load it and inspect the real change list. If you are here to fix a JSON syntax error, the shape you arrived with is almost certainly one of them.
Four different questions
Repair, format, validate, check a schema.
These get conflated constantly, and the conflation is expensive: a formatter that quietly repairs hides the fact that your data changed, and a schema check that coerces a value has not repaired anything.
- 1Malformed JSON
What arrived: a fence, a Python literal, a comma too many.
- 2Repair
Named edits with a position, a rule and a confidence tier.
- 3Strict JSON
Verified with JSON.parse — never claimed before it passes.
- 4Format
Presentation only. It changes how it reads, never whether it parses.
- 5Schema
A separate question: does valid JSON have the shape you expect?
- Validate
- Is this legal JSON?Answers yes or no and, when the answer is no, points at the exact character. It never changes your document.
- Format
- How should valid JSON be printed?Re-prints a document that is already valid. It changes presentation, never validity, and it cannot fix a broken document.
- Repair
- Can this broken document be made valid, and what would that cost?Rewrites malformed source into valid JSON and names every change, its position, its rule and its confidence.
- Schema validation
- Does this valid JSON match the shape it is supposed to have?A separate question from syntax. It runs only after the document parses, and its findings are listed apart from repair changes.
Continue with JSON Formatter for formatting, validation, tree exploration, JSONPath and schema tools; JSON to TypeScript to generate an interface from the repaired response; or Code Compare when you want a line-level diff of two whole files.
- No upload
- No account
- No AI API
- Local recovery optional
Privacy by design
Broken payloads are still your payloads.
The documents that need repairing most are the ones you would least like to paste into a chat window: production responses, webhook bodies, configuration with credentials in it. This workspace has no reason to send them anywhere.
Nothing is uploaded
Scanning, repair planning, application, verification, schema validation and every export run in this tab. There is no submit step and no request that carries your document.
No AI processing
LLM-aware, not LLM-powered. The engine understands the shapes model output arrives in; it never sends your payload to a model, in the repair path or anywhere else.
Files are opened locally
The File API reads a selected document on your device. The bytes go from your disk into this tab's memory and no further.
Optional local recovery
The working document and your review decisions are saved in this browser so a refresh does not lose them. Private session turns that off, and local data can be cleared from the workspace.
Nothing identifying leaves in analytics
A repair records that it ran, under which profile, and a coarse size bucket. Never the content, the property names, the filename or any before-and-after text.
The sensitive-content scan is a prompt, not an audit
Flags for prototype-related keys and active markup are heuristic pattern matching. A clean result means nothing obvious was found, never that a document is safe to share.
FAQ
Frequently asked questions
Keep working
Related developer tools
Got JSON that will not parse?
Paste it above and see every proposed correction with its line, its rule and the reason behind it — before you accept anything.