JSON Repair – Fix Broken JSON Automatically
Automatically fix invalid and malformed JSON. Repairs quotes, unquoted keys, trailing commas, and comments.
What is JSON Repair?
JSON repair takes broken, malformed, or non-standard JSON and rewrites it into valid JSON automatically — trailing commas stripped, single quotes converted, keys quoted, comments removed. It is built for the moment a response fails to parse and you need it working now: paste the broken text, click Repair JSON, and get valid output plus a transparent list of every change made. Repair runs client-side, so even sensitive or proprietary payloads are fixed without ever leaving your browser.
What this tool fixes.
The transparency list is the differentiator: you see exactly what was changed instead of trusting a black box — critical when the source matters. It handles the classics that break parsers, including the truncated JSON that LLM and AI chatbot output(ChatGPT, Claude, and friends) famously produces. Everything is instant — no upload, no queue.
Single Quotes
Replaces single quotes around keys and strings with standard double quotes ('value' → "value").
Unquoted Keys
Identifies JavaScript object properties and wraps keys in double quotes ({key: 1} → {"key": 1}).
Trailing Commas
Removes illegal trailing commas after the last array item or object property.
JavaScript Comments
Strips single-line (//) and multi-line (/* */) comments not permitted in standard JSON.
Python Literals
Converts Python boolean and null constants (True → true, False → false, None → null).
Numeric Quirks
Normalizes leading plus signs (+42 → 42) and invalid numeric formats.
How to fix broken JSON.
- Paste the broken JSON — drop a file or fetch from a URL if needed
- Click "Repair JSON" to rewrite it into valid JSON
- Review the repairs list — every change is shown transparently
- Copy or download the corrected document, or validate it via "Open in"
Related JSON tools.
Once repaired, verify and build on the result:
FAQ.
What kinds of broken JSON can be repaired?
Unquoted keys, single-quoted strings, trailing commas, comments, Python constants (True, False, None), undefined, missing quotes, and truncated output are all handled automatically.
Can it fix JSON produced by ChatGPT or other AI tools?
Yes. LLM output frequently wraps JSON in markdown fences or includes comments and trailing commas — paste it and the repair strips the noise, returning parseable JSON.
How do I know what was changed?
Every repair is listed transparently under the output — for example "Quoted unquoted object keys" — so you can review exactly what was modified before using the result.
Is repaired output guaranteed valid?
The tool returns RFC 8259–valid JSON whenever the input is recoverable; validate the result with the JSON Validator if you need certification before parsing.
Does repairing upload my data?
No. Repair is pure client-side JavaScript — your broken document never leaves your device, making it safe for confidential logs, exports, and pre-release data.
Will repair alter my actual data values?
No. The repair algorithm preserves all string values, numbers, booleans, and structural hierarchies. It only fixes syntax punctuation and formatting.
Looking for a different transformation? Explore thefull JSON toolkit— 11 free, private, in-browser tools that never upload your data.