AI JSON Repair (Fix Broken JSON)
Paste JSON that's almost-but-not-quite valid — from an LLM response, a log file, a half-broken config, or someone's hand-typed mess — and get back clean valid JSON with a visual diff showing exactly what changed. Handles trailing commas, unquoted keys, single quotes, Python True/False/None, JavaScript undefined, comments, surrounding prose, and markdown code fences. AI-powered and daily-capped to stay free.
Inputs to AI tools may be used to improve MarkdownMe. Data controls
Get new tools by email
We add tools most weeks. Give an email address and we send you the new ones, plus short notes on how to use them. No more than one email a week. Unsubscribe with one click.
Frequently Asked Questions
- How is this different from jsonlint or a regular JSON formatter?
- Validators tell you WHERE the error is. They don't fix it. This tool actually rewrites the broken input into valid JSON, handling LLM-specific patterns (Python booleans, trailing commas, single quotes, code fences) that deterministic parsers can't handle.
- Does it preserve my data?
- Yes. The system prompt explicitly forbids renaming keys, paraphrasing values, or inventing fields. The AI only fixes syntax. If you're worried, check the visual diff that shows every line that changed.
- What model powers this?
- It runs on MarkdownMe's capped AI endpoint. The model can change over time; the privacy page names the current ones. We daily-cap requests to keep this free for everyone.
- Will it work on truncated JSON?
- Often yes — the model will close open brackets/braces sensibly. But if too much is missing, you may lose data. The closer to valid your input is, the better the output.
- What about JSON inside markdown code fences from ChatGPT/Claude?
- Handled — the tool strips ```json ... ``` wrappers and surrounding prose. For the dedicated case of extracting JSON from a full LLM response, use the LLM JSON Extractor tool.
Related Tools
Twitter/X Text Formatter
Free Twitter/X text formatter — make tweet text bold, italic, script, monospace and more using Unicode fonts. Works in tweets, bios, and replies. Type, copy, paste. No signup.
Instagram Font Generator
Free Instagram font generator and text formatter — make your bio and captions bold, italic, script, cursive and more with Unicode fonts. Copy and paste into Instagram. No app needed.
Discord Text Formatter
Free Discord text formatter — style your username, nickname, or server name with bold, script, fraktur, monospace and other Unicode fonts. Works where Discord markdown can't. Copy and paste, free, instant.
Facebook Text Formatter
Free Facebook text formatter — make post and bio text bold, italic, script and more using Unicode fonts. Copy and paste into Facebook posts, Pages, and profiles. No signup.
About AI JSON Repair (Fix Broken JSON)
AI-powered JSON repair. Fix trailing commas, unquoted keys, single quotes, Python True/False, code fences, and other LLM-output corruption. Paste broken JSON, get clean valid JSON. AI-powered. This AI-backed tool sends your input to MarkdownMe's capped AI endpoint to generate the result. You choose whether we keep it to improve the tools. See the privacy page. No account is required. MarkdownMe provides free, fast, and reliable Markdown tools for developers, writers, and anyone who works with Markdown.