Developer tool
JSON Repair Tool
Paste malformed JSON to fix common syntax issues and copy a valid, beautified result. Works in your browser — no upload needed.
Fix common JSON syntax problems
Copied config snippets and API notes often include trailing commas, comments, single quotes, unquoted keys, or Python-style values. This repair tool cleans those common issues, then validates the result with the browser JSON parser.
If the repaired text still cannot be parsed safely, the tool shows an error instead of guessing.
Repair runs locally in your browser, making it useful for checking API payloads, internal config files, or JSON that should not leave your machine.
Practical examples
- Clean a pasted config snippet before using it as JSON.
- Remove comments and trailing commas from copied object data.
- Beautify the repaired output before sharing it in an issue or API client.
- Fix a malformed API response body that fails to parse in your client code.
- Repair a JSON config that was hand-edited and has trailing commas or unquoted keys.
Related JSON tools
Use the JSON Validator for strict syntax checks, the JSON Formatter for already-valid JSON, or the JSON Viewer to inspect nested repaired output.
FAQ
What can this repair?
It handles common issues such as comments, trailing commas, single-quoted strings, unquoted object keys, smart quotes, and True, False, or None values. These are often found in hand-edited config files, copied API notes, and code-generated JSON.
What is malformed JSON?
Malformed JSON is any JSON text that fails to parse, such as a missing quote around a key, a trailing comma after the last item, a comment left in from a config editor, or a value written in Python style such as True or None. This tool fixes common issues before passing the result to the JSON parser.
Can I use this to fix JSON from an API or webhook?
Yes. Paste the raw response body directly. The tool can help clean up common issues from logging systems, proxies, or hand-edited payloads, then return valid JSON you can copy back into your client or debugger.
Can it fix every broken JSON file?
No. If the input is ambiguous or missing too much structure, the tool shows a clear error instead of inventing data.
Does it upload my JSON?
No. Repairing and validation run locally in your browser.
Does repair change the formatting?
Yes. When repair succeeds, the output is beautified with two-space indentation.
Should I still validate the result?
The tool validates before showing output. For strict checking without repairs, use the JSON Validator.