JSON Tools for AI Developers · Runs locally

For AI developers JSON Workbench

Natural language generation · Schema · Zod · OpenAPI · Function Calling · MCP · 30+ tools

AI JSON repair

Model output and logs often leave half a JSON payload: a missing comma, an extra trailing comma, an unclosed array. This page completes it into text you can parse.

Paste the broken text on the left and click Repair JSON. Common syntax noise is smoothed out; the right pane shows something you can format again.

This is local rule repair, not a cloud model. Deep nesting or business-logic errors still need you to compare against the original.

After it works, format it, generate a Schema, or use it as a mock sample. No external API is called.

Separate dirty from broken

If you only have a BOM or a trailing comma, Clean is more conservative. Missing brackets, missing quotes, or a truncated model output belong here. Wrong fields or wrong values cannot be fixed by anyone.

Always glance at the result

Autocomplete may guess the wrong object to close. Format first, then compare with the shape you expected. Use Diff if you need to.

How to use it

  1. Paste invalid or incomplete JSON, or click Load sample.
  2. Click Repair JSON and check the status bar.
  3. Send the result to Format and confirm the nesting looks right.
  4. Check key fields against the original so nothing landed in the wrong place.
  5. When you need a sign-off, run Schema validation or Diff.

When to use it

  • An LLM reply was cut off at max tokens.
  • You copied from a log and lost the last few brackets.
  • Someone sent you single quotes or trailing commas and called it JSON.
  • Repair first, then generate a Schema and see if the shape still holds.

Keep in mind

  • No cloud model is called, and you don't need an API Key.
  • It fixes syntax, not whether the business values are right.
  • If it fails, don't keep clicking. Shrink the input and paste only the innermost object.

FAQ

Do I need an API Key?

No. Repair runs in the browser and never calls a cloud model.

Which errors does it fix well?

Trailing commas, missing commas, unclosed brackets, leftover characters — syntax noise. Wrong field names stay wrong.

How is this different from Format?

Format needs valid JSON already. Repair tries to revive the text first, then hands you something you can parse.

Is the original uploaded?

No.

When should I use Clean instead?

Use Clean for BOM, trailing commas, and dirty whitespace. Use Repair when the structure is broken.

Will it change my string values?

The goal is parseable output. If quotes don't pair, the closer it inserts may not be where you meant. Read the result.

Can it repair a JavaScript object?

Unquoted keys and single quotes often work. Complex JS expressions do not.

It still errors after repair. Now what?

Trim the input. Repair one complete object, then stitch it back.