How to use
- Click Paste to load JSON from your clipboard, or Upload to open a .json, .geojson or .txt file.
- Keep Live validation on for automatic checks up to 1 MB. For larger input, click Validate.
- Click Repair when available, then review the changes before using the result.
- Click Copy to copy the editor text, or Download to save it as a file.
Examples
Fix a hand-written app config
{
"port": 8080,
environment: 'staging',
}Invalid JSON · 3 errors
Line 3, column 3: Property name environment must be in double quotes.
Line 3, column 16: Strings must use double quotes. Replace ' with ".
Line 3, column 25: Trailing comma. Remove the comma after the last item.
Repaired · 3 fixes:
{
"port": 8080,
"environment": "staging"
}Extract JSON from an AI code block
```json
{"name": "Alice Morgan", "skills": ["Python", "SQL"]}
```Invalid JSON · 2 errors
Line 1, column 1: Text before the JSON (for example a Markdown code fence). Remove everything before the first { or [.
Line 3, column 1: Unexpected data after the end of the JSON. Only one top-level value is allowed.
Repaired · 2 fixes:
{
"name": "Alice Morgan",
"skills": [
"Python",
"SQL"
]
}Flag a duplicate config key as an error
{
"region": "us-east-1",
"retries": 3,
"retries": 5
}Invalid JSON · 1 error Line 4, column 3: Duplicate key "retries" (first defined at line 3, column 3).
Common JSON errors and how to fix them
| Error | Example | How to fix |
|---|---|---|
| Trailing comma | {"a": 1,} | Remove the comma after the last item. |
| Single quotes | {"a": 'x'} | Use double quotes for strings: "x". |
| Unquoted property name | {a: 1} | Put the name in double quotes: "a". |
| Comment | {"a": 1 // note} | Delete the comment. JSON has no comments; JSON5 and JSONC do. |
| Missing comma | {"a": 1 "b": 2} | Add a comma between the two items. |
| Python or JavaScript literal | True, None, undefined, NaN | Use true, false or null; write NaN/Infinity as null or a string. |
| Unexpected end of JSON | {"a": [1, 2 | The text was cut off: add the missing ] and }. |
| Text around the JSON | ```json … ``` | Remove the Markdown fence or the text before the first { or [. |
FAQ
What does "Unexpected end of JSON" mean?
The input ends before the JSON is complete, often because it was cut off while copying or streaming. The error names the closing bracket that is missing. Click Repair to close the cut-off JSON, then check the result, because Repair marks this change for review.
Does Repair change my data?
Some repairs can change data: NaN and Infinity become null, and cut-off strings or containers are closed. Those changes are flagged for review; duplicate keys are kept, not removed. Click Undo repair to restore the original text.
Can I validate JSON against a schema?
This tool checks strict JSON syntax, not JSON Schema. It cannot check required fields, field types or other schema rules.
Are comments allowed in JSON?
Strict JSON does not allow // or /* */ comments, so they are reported as errors. Use JSON5 Formatter to keep comments, or JSON5 to JSON to convert the text to strict JSON.
Is my JSON uploaded to a server?
Validation and repair run in your browser; the tool does not send your JSON in network requests. Option settings are saved locally, and opening your text in a related tool uses temporary sessionStorage for the handoff.