MyJSON
Editing

Repair

Fix common JSON breakages with one click.

Toolbar — Repair button appears beside Format when parsing fails.

What it fixes

Trailing commas, single-quoted strings, unquoted keys, JavaScript comments (// and /* */), Python literals (True / False / None), smart-quotes (curly quotes from word processors), unbalanced brackets, MongoDB-style ObjectId("...") wrappers, and more. Powered by the open-source jsonrepair library.

Why it appears only on failure

Repair shouldn't run on valid input — that would silently change formatting. The button only lights up when MyJSON detects a parse error, and it adds an entry to your transform undo history (Ctrl+Z brings the original back).

Examples

Stack Overflow paste

You copied a sample object from a Stack Overflow answer; it has trailing commas and JS-style comments.

  1. Paste — parse error shows.
  2. Click Repair.
  3. Document is valid.
Input (json)
// the new shape
{
  id: 'usr_1',
  name: "x",
  skills: ["go",],
}
Output (json)
{
  "id": "usr_1",
  "name": "x",
  "skills": ["go"]
}