Fixes Trailing Commas Automatically
The most common JSON error — a stray comma after the last array or object element — is repaired silently, so you can paste output from JavaScript or Python without manual editing.
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.
The most common JSON error — a stray comma after the last array or object element — is repaired silently, so you can paste output from JavaScript or Python without manual editing.
// line and /* block */ comments from JSONC config files are stripped without touching surrounding values, letting you reuse VS Code settings or tsconfig.json snippets in strict-JSON tooling.
Object literals copied from JavaScript source ({name: 'Alice'}) have their keys re-quoted and string values converted from single to double quotes, producing standards-compliant JSON.
Curly quotes (“ ” ‘ ’) pasted from Word, Notion, or rich-text editors are converted to straight ASCII quotes, removing the most invisible cause of parse failures.
Concatenated values like }{ or ][ get a comma inserted between them, so partially merged JSON arrays parse on the first try.
All repair runs in your tab via the jsonrepair library — broken API responses, log dumps, and config snippets containing secrets never reach a server.
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 } ]