Trailing commas + comments + single quotes
Input: { // user record name: 'Alice', age: 30, roles: ['admin', 'editor',], }
Output: { "name": "Alice", "age": 30, "roles": [ "admin", "editor" ] }
500+ fast, free tools. Most run in your browser only; Image & PDF tools upload files to the backend when you run them.
Fix broken JSON: trailing commas, unquoted keys, single quotes, comments, smart quotes, and missing brackets — automatically.
JSON Repair is a permissive JSON parser that automatically fixes the most common reasons a JSON document fails to parse: trailing commas after the last array or object element, single-quoted strings copied from JavaScript source, unquoted keys in object literals, // and /* */ comments from JSONC files, smart curly quotes pasted from rich-text editors, missing commas between values, hex escape sequences, and unmatched braces. The tool first tries strict JSON.parse — if that succeeds, it pretty-prints the result. Otherwise it loads the jsonrepair library on-demand and reconstructs valid JSON, which is then re-parsed for verification. The list of detected issues is shown in chip form so you can see exactly what was repaired, and the final output is guaranteed parseable. Repair runs entirely in your browser; the input never leaves your machine.
Input: { // user record name: 'Alice', age: 30, roles: ['admin', 'editor',], }
Output: { "name": "Alice", "age": 30, "roles": [ "admin", "editor" ] }
Input: {“user”: “Alice”, “active”: true}
Output: { "user": "Alice", "active": true }
Input: [{"id":1}{"id":2}]
Output: [ { "id": 1 }, { "id": 2 } ]