Developer Tool

Fix broken JSON from ChatGPT, Claude and any LLM

Deterministic rule-based repair engine. Strips markdown fences, fixes unquoted keys, balances truncated braces, and normalizes Python types instantly.

Privacy Guaranteed: Runs entirely in your browser. Zero backend. Zero third-party telemetry.
Repair Rules

Compare Fixed Output with Target JSON

Open in MAF Labs JSON Compare →
Structural diff will appear here...
Paste Broken JSON
0 chars • 0 lines
Ready for input. Paste your text or click 'Load Sample'.
Fixed JSON (Clean & Valid)
0 chars • 0 lines

        
Waiting for repair...
What Was Fixed 0 fixes detected
No repairs applied yet. Paste your broken JSON above.

Side-by-Side Line Diff

Green = Added/Cleaned, Red = Removed Junk
Diff will appear after fixing...

Frequently Asked Questions

Why does AI return invalid JSON?
Large Language Models (LLMs) generate text token by token based on probabilities. They are prone to hitting token cutoff limits mid-sentence, outputting single-quoted strings, formatting conversational greetings (```json), using Python booleans (True/False/None), or forgetting closing braces.
Is my data uploaded to any server or AI?
Never. This tool has zero backend endpoints and zero external API calls. Everything is repaired deterministically in plain JavaScript directly on your computer's browser. It works even if you disconnect your internet.
What can't be fixed?
Hopeless non-JSON text that contains no structured data (such as plain conversational prose with no keys or values) cannot be synthesized into valid JSON. When data is truncated mid-stream, data after the cut-off is lost and cannot be hallucinated without AI.
How is truncated JSON handled?
If the LLM was cut off mid-token, the engine gracefully closes the open string literal, removes dangling trailing colons or commas, and reconstructs the missing closing brackets (} and ]) in precise reverse nesting order.