JSON Repair

Skip to editor
Explorer
Open Files

No files open

0 files open

jsoneditor.io v2

{
  // exported from the admin panel
  name: 'my-app',
  "version": "1.4.0",
  "private": True,
  "maintainer": None,
  "tags": ['web', 'api',],
}
JSONUTF-8
Spaces: 2

How do I fix invalid JSON?

To fix invalid JSON, paste it above and press Repair. It removes trailing commas and comments, puts double quotes around keys and strings, turns Python's True, False and None into true, false and null, escapes stray line breaks inside strings and closes brackets on JSON that was cut off.

The repaired document is formatted and stays in the editor, so you can check what changed before copying it. If the input was valid already, Repair leaves it alone and tells you so.

  1. Paste the broken JSON into the editor.
  2. Press Repair in the toolbar.
  3. Check the result and copy or save it.

Example

Broken JSON
{
  // exported from the admin panel
  name: 'my-app',
  "version": "1.4.0",
  "private": True,
  "maintainer": None,
  "tags": ['web', 'api',],
}
Repaired
{
  "name": "my-app",
  "version": "1.4.0",
  "private": true,
  "maintainer": null,
  "tags": [
    "web",
    "api"
  ]
}

Questions people ask

What can JSON Repair fix?

Trailing commas, single quotes, unquoted keys, // and /* */ comments, Python constants, missing commas between items, raw line breaks inside strings, JSON Lines and truncated documents. It uses jsonrepair, an open source library built for exactly this.

Can it recover data from truncated JSON?

It closes the open strings, arrays and objects so the part you have becomes valid. Anything that was cut off is gone, so check the end of the document after repairing.

Why didn't Repair work on my file?

Some text is too far from JSON to guess at, like an HTML error page or a [object Object] string. The JSON errors guide explains what those mean and where they come from.

Is my data uploaded anywhere?

No, this runs entirely in your browser, so nothing you paste is sent to a server. The only feature that sends data anywhere is the optional AI assistant, and only when you actually ask it something.