Start a project

Tool 52 of 450 · Structured output

LLM JSON Repair

Fix broken JSON from model output: code fences, trailing commas, single quotes, comments and truncated endings, then validate it.

LLM JSON Repair

Your input

Result

Repaired JSON
FixCount

    01

    What it does

    Fix broken JSON from model output: code fences, trailing commas, single quotes, comments and truncated endings, then validate it.

    • Strips Markdown fences and the chat around the JSON
    • Single quotes, smart quotes and unquoted keys
    • Trailing commas, missing commas and comments
    • True/False/None, NaN and Infinity

    02

    Private by design

    Everything happens in your browser. Nothing you type, paste or upload is sent anywhere, and it keeps working offline once the page has loaded.

    03

    What you get

    Valid JSON and a log of every fix, with a Copy and a Download button on every result.

    • JSON
    • LLM
    • Structured output

    Why it matters

    Models asked for JSON still wrap it in prose, add comments, use Python's True or stop halfway when they hit the token limit, and JSON.parse rejects the lot.

    This repairs it with a character-level scanner that knows when it's inside a string, so quotes and commas in your text aren't touched, and it tells you exactly what it changed.

    How to use it

    1. Type or paste your input; the example shows the format.
    2. Press Repair. Results also update as you type.
    3. Read the summary line, then the table, notes or output below it.
    4. Copy or download what you need. Nothing leaves this page.

    FAQ

    Is a repaired truncated answer safe to use?

    It's valid JSON, but the model didn't finish, so the last value may be incomplete. The fix log says where it was cut off; re-ask with a higher token limit if it matters.

    Why not just ask for JSON mode?

    Do, where the API offers structured outputs or JSON mode. This is for everything else: logs, other tools, older models and pasted answers.

    Does it change my data?

    Only the syntax around it. Strings, numbers and keys are kept; each change is listed.

    Is my input uploaded?

    No. The tool runs in your browser and nothing you type, paste or open is sent anywhere.

    Can I rely on the result?

    It follows the public specification or formula named on this page and says where it simplifies. Check anything critical against the official tool or documentation before you ship it.

    Work with me

    Want a site that gets these right?

    I build fast, accessible websites and web apps that pass these checks from day one. Tell me about your project and I'll reply personally with honest next steps.

    All developer tools · Back to leej.uk