JSON Fixer
Automatically fix and repair broken JSON syntax
What is JSON Fixer?
Got broken JSON? We've all been there: a missing quote, a trailing comma, single quotes copied out of a Python dict, or a key someone forgot to quote. Paste your broken JSON (JavaScript Object Notation) on the left, hit Fix, and you get valid JSON back on the right.
JSON's syntax is strict. Keys need double quotes, there are no trailing commas and no comments, and every bracket has to close. The full grammar is in the RFC 8259 JSON specification, and MDN's JSON reference covers how JavaScript reads it. This tool earns its keep on API responses that came back mangled, database exports, and config files you edited by hand at 6pm.
Under the hood, Fix JSON!! posts your text to a repair endpoint on our backend, where the broken syntax is rewritten and the corrected document is handed back. Nothing is saved on the way through. Inputs over 64 KB are stopped in the browser before any request goes out, so split a big export into chunks. Treat the answer like a colleague's quick patch: diff it against your input, paying most attention to long arrays and numbers.
How to Use the JSON Fixer
Typing does not trigger anything on this page. The repair runs once, when you press the green button, and takes a few seconds round trip. Here is the whole loop:
Paste Broken JSON or Load Sample
Paste your invalid JSON into the left editor, or click Sample JSON to load a broken example (an unquoted key, single quotes, a trailing comma and a missing comma). Here's the kind of input the fixer handles:
{subscriberId: "SUB-1001", plan: "5G", dataUsage: [45, 60, ]}Typical repairs: quoting bare keys, swapping single quotes for double quotes, dropping trailing commas, adding missing commas and closing brackets, so the result parses under RFC 8259.
Click Fix JSON!!
Click the green Fix JSON!! button. Your JSON is sent to our server, the syntax gets repaired there, and the result comes back into the right panel. A loading overlay shows while it works, usually a few seconds. Both panels highlight JSON syntax so you can compare before and after.
Review Fixed Output
The right panel shows the repaired JSON. The repair is meant to touch syntax only and leave keys and values alone, but it works from a best reading of broken text, so compare the output with your input before you use it. Then copy it or download it as fixed.json.
When You'd Actually Use This
API Debugging
A service returned a body with a trailing comma, or a log line chopped off the closing brace. Paste the response, fix it, and you have a document you can actually inspect.
Manual Edits
You edited a JSON file by hand and now it won't load. Missing commas, single quotes and unquoted keys are the usual suspects, and they're exactly what this fixes.
Data Migration
Data dumped from an older system often comes out as "almost JSON": Python-style quotes, True/None, stray commas. Fix a sample record here before you write the real migration script.
Development
Test fixtures and config files pick up typos fast. Fix them here and paste them back. If your team keeps hand-editing config, JSON5 is worth a look, since it allows comments and trailing commas by design.
Common Questions
Is my JSON sent anywhere?
Yes. When you click Fix JSON!!, the text in the left editor is sent to our server, which repairs it and returns the fixed version. We don't store it. If the JSON holds secrets or personal data, strip those out first, or find the errors yourself with the JSON Validator.
What types of errors can it fix?
Missing or mismatched quotes, single quotes, unquoted keys, trailing or missing commas, unclosed brackets and braces, and stray characters. If JSON.parse throws a SyntaxError at you, this is usually the kind of problem behind it. A badly truncated document may only be partly recoverable.
Will it change my data?
It shouldn't. The repair is limited to syntax and is not supposed to add, remove or rename keys or values. Where the input is ambiguous it has to pick one reading, though, so mistakes can happen. Compare the output with your input, especially long arrays, very large numbers and strings with escape sequences.
What if the JSON can't be fixed?
If the structure is too broken, you'll get an error message instead of output. Fix the worst part by hand first (usually a missing closing bracket or a chopped-off end), then run it again.
Can I use it for large JSON files?
Up to 64 KB per request. Anything bigger is stopped before it's sent, with a message saying so. For a big file, find the broken section with the validator and fix just that chunk here.
Is the fixed JSON always valid?
Usually, but not always. Paste the result into the JSON Validator to confirm it parses before you rely on it.
Other JSON Tools You Might Need
Fixing JSON is just one thing you might need. Here are some other tools that work great together: