JSON Repair Tool
Fix broken JSON automatically. Paste malformed JSON from LLM outputs, API responses, or hand-edited configs and get valid JSON back. The tool detects and fixes common issues like trailing commas, single quotes, unquoted keys, JavaScript comments, and undefined values.
What It Fixes
- Trailing commas after last array/object item
- Single quotes instead of double quotes
- Unquoted object keys
- JavaScript comments (// and /* */)
- undefined values replaced with null
Frequently Asked Questions
What types of broken JSON can it fix?
The tool fixes the most common JSON issues: trailing commas, single-quoted strings, unquoted keys, JavaScript-style comments (// and /* */), and undefined values. These are the errors most frequently encountered when copying JSON from code or LLM outputs.
Why does my LLM output broken JSON?
Large language models often produce JSON-like output with JavaScript syntax like trailing commas, comments, or single quotes. This tool converts that output into valid JSON that can be parsed by JSON.parse() or any JSON library.
Does it show what was fixed?
Yes. After repair, the tool displays a list of all fixes applied (e.g., 'Removed trailing commas', 'Added quotes to unquoted keys') so you know exactly what changed.