JSON Repair Online

Fix broken JSON pasted from logs, code or AI output: unquoted keys, single quotes, trailing commas and missing brackets are all handled.

How to Repair Broken JSON

Paste the malformed document and the repair engine applies every fix it can, then reports exactly what was changed in a repair log beside the output.

Step 1

Paste Broken JSON

Drop in the malformed text or load the example to see the repair engine work.

Step 2

Run the Repair

Fixes are applied in order and each one is listed beside the repaired output.

Step 3

Check and Export

Confirm the result parses, then copy or download the repaired JSON.

Fix Broken JSON and See Every Repair That Was Applied

Broken JSON is everywhere. It comes out of log files, browser consoles, support tickets and copy-pasted documentation, and increasingly it comes out of AI models that produce something JSON-shaped rather than JSON. A parser refuses all of it, which is the correct behaviour and also completely unhelpful when the payload is one typo away from being usable.

The repair engine works through the damage in a fixed order and reports every fix it applies. Unquoted keys are quoted. Single quotes, curly quotes and backtick strings become double quotes. Bare string values are quoted. Python and JavaScript literals such as True, False and None become their JSON equivalents. Unclosed objects and arrays are closed, unterminated strings are finished, invalid escape sequences and raw control characters are corrected, malformed numbers are fixed, duplicate keys are merged, and a JSON block buried in surrounding prose is extracted on its own. If the text holds several documents, they are wrapped into a single array.

The log matters as much as the output. Repairs are counted and listed individually, so you can see that four quotes were converted and one object was closed rather than trusting a silent transformation. The same log makes review easy in a code review or a ticket, because every change is documented rather than implied. When the input is already valid, the tool says so instead of changing anything. When a document cannot be repaired, the remaining error is reported with its position rather than a vague failure message.

Everything runs in your browser. Repairing a payload from a customer ticket, a webhook or a model response usually means handling data that should not be pasted into a third-party service, and here it never leaves the machine. The engine is deterministic: the same broken input always produces the same repairs, so a result can be reproduced and verified by anyone else holding the same file. There is no upload, no account and no queue to wait in.

The repaired output is parsed before it is offered, so copy and download only unlock once the result is genuinely valid JSON. From there it can go straight into the formatter or the validator for the next step. That matters most when the payload came from somewhere you cannot ask for a clean copy, such as a log that has already rotated or a model response you would rather not regenerate. Repair is the recovery stage, and it is the difference between retyping a payload by hand and reusing it as it is.

Quote Repair

Unquoted keys, single quotes, curly quotes and backtick strings all become valid JSON.

Literal Conversion

Python and JavaScript values such as True, False and None become their JSON equivalents.

Bracket Recovery

Unclosed objects and arrays are closed, and unterminated strings are finished.

Surrounding Text

A JSON block buried in prose or log output is extracted and repaired on its own.

Transparent Log

Every applied fix is listed with its count, so nothing changes silently.

Validated Output

The result is parsed before it is offered, so copy and download only unlock for valid JSON.

FAQ

Frequently Asked Questions

Unquoted or numeric keys, single and curly quotes, backtick strings, trailing commas, unclosed brackets, unterminated strings, bad escapes, malformed numbers and language literals such as True and None, plus raw control characters and duplicate keys that overwrite each other.

No. Only syntax is adjusted during a repair. Keys, values and structure survive the process intact, and duplicate keys are merged rather than dropped without telling you exactly what happened in the log.

The remaining error is reported with its position. Some damage is genuinely ambiguous, and the tool says so instead of guessing at the structure you originally intended to write that way, rather than producing something that only looks right.

Yes, that is one of the most common cases. Model responses often mix prose with JSON-shaped text, and the repair engine extracts the JSON block and fixes it on its own.

Multiple JSON documents found in the input are wrapped into a single array, so nothing is discarded and each document stays addressable by its own index in the output for later use.

No. Every fix is counted and listed in the repair log, so you can review exactly what changed before you use the output anywhere that matters, such as a production file.

No. Repairing runs entirely in your browser, which matters because broken payloads usually come from tickets, logs and internal systems that contain sensitive data you cannot share with anyone outside your team.

Validation reports what is wrong and stops there. Repair applies corrections and then validates the result, so it is the step you take when a document will not parse at all.

Yes. Every repair type is available without signup or limits, because the whole engine runs on your own device with nothing sent anywhere, and the output carries no watermark of any kind.