Repair broken or invalid JSON in your browser. Fix trailing commas, single quotes, unquoted keys, missing brackets, comments, and Python constants, then copy or download valid JSON without uploading your data.
Repair JSON with trailing commas, single quotes instead of double quotes, unquoted object keys, and missing closing brackets. The tool applies best-effort fixes and returns valid JSON when the structure can be recovered.
Remove single-line (//) and block (/* */) comments from JSON-like input. Comments are not valid standard JSON, so they are stripped before the result is serialized.
Convert single quotes to double quotes and normalize smart quotes (“ ” ‘ ’) to straight quotes. Unquoted object keys are wrapped in double quotes so the document parses.
Convert Python constants such as True, False, and None, plus common JavaScript values such as NaN and Infinity, into valid JSON values when they appear in the input.
The repaired output is parsed to confirm it is valid JSON before it is shown. If the document cannot be recovered, the tool reports an error instead of returning a partial or misleading result.
Copy the repaired JSON to your clipboard or download it as a .json file for use in APIs, configuration, tests, or other development workflows.
Paste broken JSON into the input or open a local file. The repair runs in your browser, so the source text is not uploaded to a server.
Repair, validation, and formatting happen in your browser. The page does not require an account or send your JSON to a remote service.
Paste invalid JSON into the input field, or open a local .json file. The page accepts documents with trailing commas, single quotes, unquoted keys, comments, or missing brackets.
Click Repair JSON. The tool attempts best-effort fixes and parses the result. If the document can be recovered, valid JSON is produced; otherwise an error is reported.
Check the repaired JSON in the output panel. Use the indent selector to switch between 2 spaces, 4 spaces, or a tab for the displayed result.
Copy the repaired JSON or download it as a .json file. Validate it with a JSON schema validator before using it in production if the data is important.
Recover an invalid JSON document that uses comments, single quotes, unquoted keys, and a trailing comma.
// user record
{
name: 'Alice',
age: 28,
active: True,
tags: ['admin', 'user',],
}This document is not valid JSON: it has a // comment, single-quoted strings, an unquoted key, a Python True, and a trailing comma before the closing bracket.
{
"name": "Alice",
"age": 28,
"active": true,
"tags": [
"admin",
"user"
]
}The repair strips the comment, converts quotes and the key, maps True to true, removes the trailing comma, and produces valid, parseable JSON.
Repair is best-effort. It cannot invent missing data, so a document that is too structurally broken may still fail to repair.
JSON repair is the process of turning invalid JSON into valid, parseable JSON. Real-world JSON often breaks because of copy-paste from code, exported configuration, or REPL output. A JSON fixer applies best-effort corrections so the document can be parsed again.
} or ] is removed.{ or [ are closed when the structure allows it.// and /* */ comments are stripped.True, False, None, NaN, and Infinity are mapped to valid JSON.Repair fixes syntax so the document becomes valid JSON. Formatting, by contrast, only changes indentation and spacing of JSON that is already valid. Use repair first; if you only need readable spacing on valid JSON, a formatter is enough.
JSON syntax error fix is best-effort. It cannot invent missing data or recover a document whose structure is fundamentally wrong. If the input is too broken, the tool reports an error rather than returning a misleading result. After repair, validate important data with a JSON schema validator before using it in production.
Repair runs entirely in your browser. Your JSON is not uploaded, and no account is required. Do not paste passwords, tokens, or production credentials into any online tool.