
This AI JSON fixer turns the answer of a chatbot into valid JSON you can paste into code. It removes the ```json fence and the sentences around it, then repairs the usual AI mistakes: curly quotes, single quotes, trailing commas, comments, True / None and output that was cut off. Everything runs in your browser.
Here is it: {“name”: “Mouse”, inStock: True, tags: ['usb',],} becomes {"name": "Mouse", "inStock": true, "tags": ["usb"]}, with a note for each fix.
Why does ChatGPT produce broken JSON?
Chat models write text, not data. They add explanations, use typographic quotes, copy Python values like None, or stop in the middle when the answer is long.
How do I stop it from happening?
Ask for "only JSON, no explanation", or use the structured output or JSON mode of the API. This tool cleans up answers from the chat window.
What if the answer contains several JSON blocks?
The first ```json block is used. Paste the other block on its own to fix it.