Help
  • The editor on the left marks JSON error locations in real time. Click the "Repair JSON" button to automatically repair the JSON and output it on the right.
  • Supports fixing common issues such as missing quotes, missing commas, trailing commas, single quotes, comments, truncation, and Python constants (None/True/False).
  • If the input is already valid JSON, the repaired result is identical to the formatted result.
JSON Repair

The JSON repair tool helps you automatically fix various JSON format errors, restoring corrupted JSON data to a valid format.

All tools on this site run entirely in your browser locally. No data is uploaded to any server.

Common issues that can be repaired:

  • Missing quotes: unquoted keys or string values, e.g. {name: "John"}
  • Missing commas: commas omitted between object or array elements
  • Trailing commas: an extra comma after the last element
  • Single quotes: single quotes used instead of double quotes, e.g. {'name': 'John'}
  • Special quotes: special characters such as Chinese curly quotes “”‘’
  • Comments: contains /* ... */ or // ... comments
  • Truncated JSON: content cut off, leaving brackets/quotes unclosed
  • Python constants: None/True/False converted to null/true/false
  • Escaped strings: removes redundant escape characters, e.g. {\"key\": \"value\"}
  • JSONP: removes the callback({...}) wrapper
  • Code block markers: removes ```json ``` fences
  • Ellipsis: removes ... placeholders in arrays/objects
  • Multi-line JSON: merges multiple newline-separated JSON entries into an array

Common uses:

  • Repair malformed JSON data returned by APIs
  • Repair JSON snippets copied from code (unquoted keys, etc.)
  • Repair JSON in truncated log files
  • Repair non-standard JSON generated by LLMs