JSON Tools

JSON Repair

Fix common JSON mistakes — trailing commas, single quotes, unquoted keys — with every change clearly listed so you can review before you use it.

Use the tool ↓

Your data is processed locally in your browser and is not uploaded to our servers.

Original (possibly broken) JSON
Original
Repaired
No changes yet.
Paste malformed JSON to attempt a repair.

About this tool

Most "broken" JSON in practice isn't broken in some exotic way — it's one of a handful of very common, very specific mistakes that happen when JSON gets hand-written, copy-pasted from a non-JSON source, or edited by someone used to a different language's syntax. A trailing comma left after the last item in an array. Single quotes instead of double quotes, carried over from JavaScript or Python habits. Object keys left unquoted, again a JavaScript convention that isn't valid in strict JSON. Python's True/False/None pasted in where JSON wants lowercase true/false/null. This tool targets exactly that specific, common set of problems.

The most important design decision here isn't which mistakes to fix — it's how to handle the fixing honestly. A repair tool that silently rewrites your data and hands back something different, with no record of what changed, is asking you to trust it blindly, which is a bad position to be in with data you might not have fully reviewed yourself. This tool never does that: every repair pass shows the original text and the repaired result side by side, plus an explicit list of exactly which category of fix was applied — "Removed trailing commas," "Converted single-quoted strings to double-quoted strings," and so on. Nothing is fixed silently, and nothing is guessed at beyond the documented, narrow set of patterns this tool recognizes.

Each fix is applied conservatively, with a bias toward leaving ambiguous cases alone rather than guessing wrong. The single-quote-to-double-quote conversion, for instance, skips any string that already contains a double quote internally, rather than risk corrupting content by guessing how to escape it — an edge case flagged as unfixed rather than silently mishandled. If the repaired result still doesn't parse as valid JSON after every documented fix has been attempted, the tool says so plainly rather than presenting something broken as if it were fixed.

This is meant for the everyday case of cleaning up JSON-like text — from a config file edited by hand, a value copy-pasted from code, an LLM-generated response that's JSON-shaped but not quite strict JSON — not for arbitrary or deeply malformed input. Always review the repaired output and the list of changes before trusting it with anything that matters. Everything runs locally in your browser; nothing you paste is sent anywhere.

How to use it

01

Paste the broken JSON

Trailing commas, single quotes, unquoted keys, comments, and Python literals are all recognized.

02

Review the repaired output

The fixed version appears alongside your original, unchanged input.

03

Check exactly what changed

Every applied fix is listed explicitly — nothing is changed silently.

04

Copy once you've verified it

Only copy the repaired result after confirming the changes are what you expect.

Example

Broken
{name: 'John', tags: ['a','b',], active: True,}
Repaired
{"name": "John", "tags": ["a","b"], "active": true}

Common use cases

Cleaning up LLM-generated JSON

Fix common near-miss JSON output from a language model before parsing it.

Fixing hand-edited config files

Repair a config file edited casually with JS-style syntax habits.

Recovering pasted data

Fix JSON-like data copy-pasted from a Python script or JS console.

Debugging a parse failure

Quickly identify and fix the specific mistake blocking JSON.parse.

Onboarding non-JSON-strict data

Bring loosely-formatted JSON-like input up to strict JSON before use.

Teaching strict JSON syntax

Show exactly which common habits (from JS or Python) aren't valid JSON.

Frequently asked questions

Related tools

Related articles