Skip to content
Motifuse

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

Runs locally

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 yet
Paste malformed JSON or load a sample.

Nothing 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.
Ln 1, Col 10 characters1 line
Ready for JSON Saved locally
  • Runs locally
  • No account required
  • Export available
  • Deterministic, not AI

Simple process

How JSON Repair Pro works

  1. 01

    Add malformed JSON

    Paste, drop a file or load a sample. Up to 15MB, read on your device.

  2. 02

    Detect and classify issues

    A string-aware scanner matches each problem to a named rule and a position.

  3. 03

    Review proposed repairs

    Line, column, token, replacement, rule and confidence tier — per change.

  4. 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.

LLM wrapper extractionCode fences, prose, `<json>` tags, JSONP and SSE `data:` prefixes come off first.
Deterministic syntax repairSame input and settings, same result — including the change ids. No model, no randomness.
Reviewable change manifestEvery edit names its rule. The comparison renders that manifest rather than replacing it.
Truncation detectionCut-off strings and containers are closed — and the result says closed, not complete.
Schema validationOptional, after the document parses. Schema findings stay separate from repairs.
Ambiguity controlsundefined, NaN, bare identifiers and duplicate keys become decisions, never silent conversions.
Local processingNo upload, no repair API, no model call. The payload never reaches a URL or an analytics event.
Retry feedback for AI pipelinesDiagnostics to hand back to the producer, generated locally, payload excluded by default.

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 fenceSafe
  • Explanatory text around the JSONReview recommended
  • JSONP callback wrapperSafe
  • XML-style tag wrapperSafe
  • Parentheses around the root valueSafe
  • Server-sent-events `data:` prefixSafe
  • JSON encoded inside a stringReview recommended
  • Selected one JSON candidateReview recommended

Quotes, keys and escapes

9 rules

  • Unquoted property nameSafe
  • Single-quoted property nameSafe
  • Single-quoted stringSafe
  • Typographic quotation marksSafe
  • Template-literal stringReview recommended
  • Mismatched string delimiterReview recommended
  • Unescaped double quote in a stringReview recommended
  • Line break inside a stringSafe
  • Invalid escape sequenceReview recommended

Commas and colons

7 rules

  • Trailing commaSafe
  • Repeated commaReview recommended
  • Leading commaSafe
  • Missing comma between membersReview recommended
  • Missing colon after a property nameReview recommended
  • Equals sign used as a separatorSafe
  • Semicolon used as a separatorSafe

Containers and truncation

6 rules

  • Unclosed objectReview recommended
  • Unclosed arrayReview recommended
  • Extra closing braceReview recommended
  • Extra closing bracketReview recommended
  • Unclosed string at the end of the documentAmbiguous
  • Incomplete value at the end of the documentAmbiguous

Non-JSON literals

8 rules

  • Python-style booleanSafe
  • Python `None`Safe
  • JavaScript `undefined`Ambiguous
  • NaN or InfinityAmbiguous
  • Bare identifier used as a valueAmbiguous
  • Constructor call used as a valueAmbiguous
  • Ellipsis placeholderAmbiguous
  • Concatenated stringsReview recommended

JSON5 and JavaScript syntax

5 rules

  • CommentSafe
  • Leading plus on a numberSafe
  • Hexadecimal numberSafe
  • Number written in a form JSON rejectsSafe
  • Multi-line string continuationReview recommended

Document format

2 rules

  • Newline-delimited JSONReview recommended
  • Duplicate object keyAmbiguous

Encoding and invisible characters

4 rules

  • Byte-order markSafe
  • Invisible characterSafe
  • Non-breaking space in structural positionSafe
  • Raw control character in a stringSafe

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.

  1. 1Malformed JSON

    What arrived: a fence, a Python literal, a comma too many.

  2. 2Repair

    Named edits with a position, a rule and a confidence tier.

  3. 3Strict JSON

    Verified with JSON.parse — never claimed before it passes.

  4. 4Format

    Presentation only. It changes how it reads, never whether it parses.

  5. 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.

LLM-aware, not LLM-powered. Repair is deterministic and runs locally. No model is called in the repair path, and the retry-feedback export excludes your payload unless you explicitly include it.

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

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.