Watch: fix broken JSON from an AI reply
No sound. Each step is captioned on screen and also written out in the guide below.
AI Tools
Paste a whole chatbot reply or almost-JSON. Get back valid JSON, with every fix listed, including output that was cut off mid-answer.
Repairs as you type. Code fences and text around the JSON are handled for you.
Your repaired JSON will appear here.
Paste an AI reply to extract and repair its JSON.
| Fix | Where (line:column) |
|---|
No sound. Each step is captioned on screen and also written out in the guide below.
The whole answer is fine. The JSON is found inside code fences or surrounding text.
Every change is listed with its line and column. A warning appears if the output was cut off.
Choose pretty or minified, then copy or download it as a .json file.
{name: 'Ada', tags: ["a" "b",], ok: True} // done
{"name": "Ada", "tags": ["a", "b"], "ok": true}Unquoted keys, single quotes, a missing comma, a trailing comma, a Python literal, and a comment, fixed in one pass.
No. It's a parser that knows the mistakes AI models make, so it's instant, free, and gives the same result every time. It never rewrites your values.
Open strings and brackets are closed, and any value that was only partly written is dropped rather than guessed. A warning tells you data is missing, so ask the model to continue or raise its output limit.
No. Numbers keep their exact digits, even IDs too large for JavaScript, and keys stay in their original order. Only formatting mistakes are changed, and each one is listed.
Text that isn't JSON-like at all, such as prose in the middle of an object. You'll see exactly where it stopped so you can fix that spot by hand.
Use the model's structured output or JSON mode with a schema when your API supports it, and give an example of the exact shape you want. The AI JSON Schema Builder turns an example into a schema for OpenAI, Claude, or Gemini. This tool is the safety net for everything else.