Paste broken JSON and repair it with one click. Fixes trailing commas, missing quotes, Python values, comments, and more. 100% browser-based—your data stays private.
Our JSON auto-fix tool repairs a wide range of common errors that make JSON invalid. Here are the most common issues we can fix automatically.
Removes commas after the last element in objects and arrays
Adds double quotes around unquoted property names
Converts single quotes to JSON-valid double quotes
Converts True, False, None to JSON equivalents
Removes // line comments and /* block comments */
Adds missing commas between object properties or array elements
Your JSON data never leaves your browser. Unlike other online tools that upload your data to servers, we process everything locally using JavaScript. This makes it safe to fix JSON containing API keys, credentials, or personal information.
Everything you need to know about fixing invalid JSON online.
Our JSON auto-fix tool can repair: trailing commas, missing quotes around keys, single quotes instead of double quotes, Python values (True, False, None), JavaScript values (undefined, NaN, Infinity), comments (// and /* */), missing commas between elements, invalid escape sequences, and JSONP callback wrappers.
Paste your JSON into our tool and click 'Format'. The error message will show you the exact position of the problem. If it's a fixable error (like a trailing comma or missing quote), click the 'Fix JSON' button to automatically repair it. The tool shows the line number and character position to help you locate the issue.
Yes! Our tool automatically converts Python values to JSON equivalents: True becomes true, False becomes false, and None becomes null. Just paste your Python-style JSON and click 'Fix JSON'. This is especially useful when copying data from Python scripts or Django applications.
Yes, completely. All processing happens in your browser using JavaScript. Your JSON data never leaves your device and is never sent to any server. This makes it safe for fixing JSON containing sensitive information like API keys, passwords, or personal data.
JSON specification doesn't allow trailing commas after the last element in objects or arrays. While JavaScript allows {"a": 1,}, JSON requires {"a": 1}. Our tool automatically removes these trailing commas to make your JSON valid.
Standard JSON doesn't support comments, but our tool can remove them automatically. It handles both // single-line comments and /* multi-line comments */. Just paste your JSON with comments and click 'Fix JSON' to strip them out.
Yes! API responses sometimes come wrapped in JSONP callbacks like callback({...}) or with other formatting issues. Our tool can unwrap JSONP, fix malformed responses, and handle concatenated JSON objects that sometimes appear in log files.
Validate checks if your JSON is valid and shows error messages with line numbers. Fix JSON goes further - it automatically repairs common issues like trailing commas, missing quotes, and Python values. Use Validate to diagnose, use Fix to repair.
Understanding what your JSON error means helps you fix it faster.
Unexpected token } in JSONCause: Usually means a trailing comma before the closing brace
Fix: Remove the comma before } or ]
Expected property name or }Cause: Unquoted property key or missing closing brace
Fix: Add double quotes around property names
Unexpected token ' in JSONCause: Using single quotes instead of double quotes
Fix: Replace all single quotes with double quotes
Unexpected identifierCause: Usually Python True, False, None, or unquoted strings
Fix: Use true, false, null (lowercase) and quote strings
Our auto-fix tool handles all these errors automatically. Just paste your JSON and click Fix JSON.