JSON Repair Tool
Fix common JSON syntax mistakes automatically and see exactly what was changed.
How this tool works
Paste the broken JSON
Trailing commas, single quotes, unquoted keys, comments, or missing commas - any combination is fine.
Fixes are applied automatically
Each category of mistake is checked and corrected in turn.
Read the "what was fixed" summary
A plain list shows exactly which categories of fix were applied - nothing changes invisibly.
Copy the repaired JSON
The result is pretty-printed and re-validated before it's shown as successful.
Quick facts
- Category
- Formatters & Beautifiers
- Best for
- Fixing a hand-edited config file or JS-object-literal-turned-JSON that won't parse
About this tool
Paste JSON that fails to parse and this tool attempts to automatically fix the mistakes that cause most real-world JSON errors: trailing commas before a closing brace or bracket, single quotes used instead of double quotes, unquoted object keys (valid in JavaScript object literals but not JSON), JavaScript-style comments (// and /* */) left in from hand-editing, and missing commas between properties or array items. Unlike json-formatter, which only validates and pretty-prints already-valid JSON, this tool actively rewrites the input to fix it - and shows exactly which fixes were applied in a plain summary below the result, so nothing changes silently without you knowing what happened. If the input has an issue too significant to safely guess at - a genuinely mismatched bracket, a truncated value - the tool reports a clear parse error instead of producing a guessed, possibly-wrong result. Runs entirely client-side.
Why use this tool
Fixes five common mistake categories
Trailing commas, single quotes, unquoted keys, JS comments, and missing commas - the ones that actually happen.
Transparent about what changed
A visible summary lists every category of fix applied, instead of silently rewriting your input.
Never guesses wrong silently
The repaired output is re-validated with a real JSON parse before being shown - if it still doesn't parse, you get an error, not broken output.
Different job than the formatter
json-formatter validates and pretty-prints already-valid JSON; this tool is specifically for JSON that doesn't parse yet.
Frequently asked questions
The JSON Formatter validates and pretty-prints JSON that's already syntactically correct - if it's not valid, that tool just reports the parse error and stops. This tool is specifically for JSON that fails to parse: it actively rewrites the input to fix common mistakes (trailing commas, single quotes, unquoted keys, comments, missing commas) and only shows a result once the fixed version successfully parses as valid JSON.
After applying every available fix, the tool always re-validates the result with a real JSON.parse - if that still fails (for example, because of a genuinely mismatched bracket or a value cut off mid-string), you get a clear parse error instead of a guessed and possibly-wrong output. The tool is deliberately built to fail loudly rather than silently produce incorrect JSON.
No - the repair logic tracks which parts of the input are inside a string literal versus structural JSON syntax, so fixes like comment removal and quote normalization are only applied outside of string content. A slash inside a string value, for example, is never mistaken for the start of a comment.
Explore more free tools
Formatters, converters, validators, and generators - all free and running entirely in your browser.
Browse more tools