Developer GUIDE

JSON Repair Guide

Repairs common syntax problems. Inspect the result because intended values cannot always be inferred.

Updated About 2 min read
Open JSON Repair

Repair broken JSON before you format it

An API example, copied configuration, or handwritten object may look like JSON but contain single quotes, unquoted property names, or a trailing comma. JSON Repair attempts to turn common malformed syntax into valid JSON, locally in your browser. It cannot know whether the repaired values match your original intention.

Try a small worked example

  1. Open the tool and select Load example.
  2. Select Repair JSON.
  3. Compare the result with the input, including every property and value.
  4. Use Copy result or Download result after reviewing it.

For example, this input has an unquoted key, single-quoted string and trailing comma:

{name: 'CyberClutch', enabled: true,}

The intended repaired JSON is:

{
  "name": "CyberClutch",
  "enabled": true
}

This is syntax repair, not a schema check. A property called enabled may be syntactically valid but inappropriate for the receiving application. Missing information cannot be recovered reliably from punctuation alone.

When a repair fails or changes too much

Start with the smallest relevant object. Check for a truncated download, unmatched quotation marks, unrelated text surrounding the JSON, or multiple documents pasted together. Keep the original so unintended changes are easier to detect.

Inspect strings, numbers, booleans, arrays and null values separately. Preserve leading zeros in identifiers as strings where the receiving system requires them. Exact source bytes are not preserved by repair and formatting; do not replace a signed or checksummed source with a repaired document.

Format and validate the repaired result

Copy the reviewed output into JSON Formatter + Validator to inspect nesting and choose readable or compact formatting. Then use JSON Schema Validator with your application's schema to check required properties and value types. Moving between tools does not transfer data automatically or put it in a URL.

Privacy and limits

Input and output are processed locally and excluded from site analytics. Text is limited to 100,000 characters; processing is bounded to 15 seconds and structural limits apply. Use Cancel during processing or Clear afterward. Copying, downloading or sharing a screenshot can still disclose the content, so use synthetic examples when asking for help.

Ready to try it?

JSON Repair

Repairs common syntax problems. Inspect the result because intended values cannot always be inferred.

Open JSON Repair

Related tools

Related resources