JSON Repair

Fix trailing commas, single quotes, comments, and other common JSON issues.

Free Online JSON Repair Tool

Invalid JSON from AI models, copy-pasted JavaScript, or hand-edited configs is frustrating. Dokall's JSON repair tool automatically fixes common syntax issues and returns valid, pretty-printed JSON.

Paste broken JSON, click Repair, and copy the result. The tool lists what was fixed - trailing commas removed, quotes normalized, brackets closed, and more. All processing runs in your browser.

Frequently Asked Questions

What JSON errors can this tool fix?
Common fixes include trailing commas, single-quoted strings, unquoted keys, JavaScript-style comments, markdown code fences around JSON, and truncated output from LLMs. The tool lists every fix it applied so you can review the changes.
Can it fix JSON from ChatGPT or other AI models?
Yes. LLM output frequently includes trailing commas, markdown wrappers (```json), and comments - all invalid in strict JSON. Paste the raw output and Dokall repairs it into valid, pretty-printed JSON.
Is repaired JSON always correct?
The tool fixes syntax errors, not semantic errors. A repaired file is valid JSON, but the data might still be wrong - missing fields, incorrect types, or truncated values. Always review the output, especially for AI-generated content.
What is the difference between JSON repair and JSON format?
The JSON formatter validates and pretty-prints already-valid JSON. JSON repair fixes broken syntax first, then formats. Use repair when JSON.parse() throws an error; use the formatter when your JSON is valid but minified or hard to read.
Is my data sent to a server?
No. Repair runs entirely in your browser. Your JSON - including API keys, user data, and configs - never leaves your device.