JSON Repair Tool
Broken JSON
Loading editor...
Repaired JSON
Loading editor...

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

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.