JSON Repair
Fix common JSON issues: comments, trailing commas, unquoted keys. Shows a change log of every fix applied.
What JSON Repair fixes — and what it cannot
JSON Repair is a best-effort fixer for common hand-written or copy-pasted JSON mistakes. It corrects issues that a strict JSON parser would reject, so you can recover data without manually hunting down every formatting error.
| Issue | Fixed? | Example |
|---|---|---|
| JavaScript comments (// and /* */) | Yes | // this gets removed |
| Trailing commas | Yes | [1, 2, 3,] → [1, 2, 3] |
| Unquoted keys | Yes | {name: "x"} → {"name": "x"} |
| Single-quoted strings | Yes | {'x': 'y'} → {"x": "y"} |
| Missing quotes around string values | Sometimes | Depends on context |
| Deeply inconsistent structure | No | Cannot infer intent from garbled input |
A typical repair
JS-style config → valid JSON
Input
{
// server config
name: "api",
port: 8080,
debug: true,
}Output
{
"name": "api",
"port": 8080,
"debug": true
}Note: The change log below the repaired output lists every modification made — so you can verify nothing important was silently altered.
When to use repair vs rewriting manually
- Use repair when you have a large JSON blob with a few copy-paste issues you do not want to hunt individually.
- Use repair when a tool exported non-standard JSON with comments or trailing commas that a parser rejected.
- Rewrite manually when the structure itself is wrong — repair cannot infer what a missing key or mismatched bracket should have been.
Frequently Asked Questions
Your files stay on your computer. Dad promised.