Fix broken JSON from AI models
Paste JSON that will not parse. The fixer removes code fences, trailing commas, comments and single quotes, closes cut-off brackets, and formats the result.
Free, no sign-up. Runs in your browser, nothing is uploaded.
Repaired 7 kinds of problems:
- Removed the markdown code fence
- Quoted unquoted keys
- Changed single quotes to double quotes
- Removed trailing commas
- Converted Python True/False/None
- Removed comments
- Closed brackets left open by a cut-off response
How to use it
- 1
Paste the broken JSON, including any text or ``` fences around it.
- 2
The fixer repairs it and shows every change it made.
- 3
Copy the formatted or minified JSON, or read the exact error if something cannot be fixed automatically.
Why LLMs return broken JSON
Language models write JSON one token at a time and learned it from code that is not always strict JSON. Typical slips: wrapping the answer in ``json fences, adding a sentence before it, leaving a trailing comma, using single quotes or Python's True and None, adding //` comments, or stopping mid-object when they hit the output limit.
Any of these makes JSON.parse fail, and with it your n8n flow, script or integration. The fixer handles all of them, and lists the repairs so you can see what the model got wrong.
Prevent it at the source
Most current models support structured outputs, where the API guarantees valid JSON that matches a schema. The model pages on our AI model pricing table show which models support it. Raising max_tokens prevents cut-off objects.
Frequently asked questions
Paste the JSON here. The error usually comes from a trailing comma, single quotes, a comment or text around the JSON; the fixer repairs these and shows the position of anything it cannot fix.
It closes open brackets and braces so the remaining data parses. A value cut off mid-string may still need a check.
Yes. If the input is already valid, it simply formats it and says no fixes were needed.
No. Repair and validation run entirely in your browser.
More free tools for working with AI
- ChatGPT to WordPaste an AI answer, get a clean Word document with real headings, lists, tables and bold text. No asterisks, no # signs, nothing uploaded.
- AI text cleanerOne click removes the asterisks, # signs, em dashes, curly quotes and invisible characters that AI tools leave in copied text.
- Word and token counterWords, characters, sentences, reading time and keyword density, plus the token count and what your text costs to send to the main AI models.
- Long text splitterPaste a document that is too long for one message. Get numbered parts that fit, with instructions that make the AI wait until it has all of them.
- AI token cost calculatorCompare what a prompt costs across providers.
- AI model pricing tablePrices, context and capabilities for 185 models.
Your team, every AI model, one workspace
Intrascope gives employees GPT, Claude, Gemini and 120+ models with shared company context, budgets per user and team, and exports to PDF, DOCX and PPTX. 7-day free trial.