JSON Repair
Fix invalid JSON automatically: trailing commas, single quotes, comments, unquoted keys, missing brackets, Python True/None and more.
Broken JSON
Repaired JSON
β Repaired: 8 kinds of fixes
- Removed comments
- Added quotes around property names
- Converted single quotes to double quotes
- Converted Python True/False/None
- Removed trailing commas
- Added missing commas
- Added missing closing ']'
- Added missing closing '}'
What can JSON Repair fix?
- Trailing commas and extra commas:
[1, 2,] - Single quotes and curly βsmartβ quotes:
{'a': 'b'} - Unquoted keys and values:
{name: Ann} - Comments:
// β¦,/* β¦ */and# β¦ - Missing commas, colons and closing brackets (for example cut-off API responses)
- Python and JavaScript values:
True,False,None,undefined,NaN - Wrappers: Markdown code fences, JSONP
callback(β¦),const x = β¦; - Several JSON values in a row (NDJSON), which are wrapped into an array
Big numbers are kept exactly as written, so long IDs like 12345678901234567890 are not rounded. Everything runs in your browser.
Guides
- Unexpected Token in JSON: What It Means and How to Fix It
- 9 Common JSON Syntax Errors and How to Fix Them
More free tools
JSON ViewerTree view, search, copy path. Handles huge files.JSON FormatterBeautify or minify JSON in one click.JSON ValidatorClear errors with exact line and column.JSON to CSVFlatten nested JSON into a spreadsheet.JSON β YAMLConvert between JSON and YAML.JSON to TypeScriptGenerate TS interfaces from sample data.JSON DiffSee what changed between two JSON files.JSONPath TesterQuery JSON with JSONPath expressions.