LLM output JSON repair

Fix the broken JSON that AI models return, and check it against your schema.

AI models often return almost-JSON: wrapped in a code fence, with trailing commas, or cut off halfway. Paste the output to get valid JSON with every fix listed, then check it against a JSON Schema. Repairs only fix syntax; they never add values the model didn’t write.

Syntax fixes only, with an optional schema check · Last updated 3 Dec 2026
Shortcuts ⌘↵ repair⌘K tools

How it works

A tolerant parser reads the output, applies only syntax fixes, and lists each one. The schema check covers type, required, properties, items, enum, const, additionalProperties: false, minimum, maximum, minLength, maxLength, minItems, maxItems and anyOf. Any other validation keyword, such as pattern, format or $ref, is listed as “not checked”.

What stays local

The model output and your schema. Both stay in the sealed frame, which can’t use the network. Only the on or off state of “Check schema” is remembered in your browser.

Worked examples

Cut-off output

Missing brackets are closed; missing values are reported, not invented. With a schema that requires stock.us, you see “stock.us is required”.

Code fence and chatter

“Here is the data you asked for:” and the ```json fence around it are removed, and the removal is listed.

Python-style output

{'ok': True, 'note': None,} becomes {"ok": true, "note": null}, with each kind of change listed.

Questions

Will it make up missing values?

No. It closes brackets and removes junk, and a schema check tells you what is still missing. A string that was cut off is closed where it stopped, and a property name left without a value is removed. Both are listed.

What can’t it repair?

Anything that would need a guess, such as NaN, undefined, a missing colon or brackets that don’t match. The tool then says it couldn’t repair the output safely and names the problem, with its line and column when no other fix came before it.

Does a clean schema check mean my whole schema passed?

Only if nothing is listed as “not checked”. The tool shows “Matches the schema” only when every validation rule in your schema is one it checks.

Are large numbers safe?

Yes. Numbers are never converted, so 9007199254740993 stays exactly as written, in the repaired JSON and in the schema check.

How large can the output be?

Repair runs in a background worker and is limited by your device’s memory. Input over 2 million characters waits for ⌘↵, and the schema check is skipped for results over 5 million characters.

Changelog · 3 Dec 2026: first release.

↑↓ move · ↵ open · Works on every page