Developer tool / 30

LLM JSON Repair & Auto-Fixer

Repair truncated, malformed, single-quoted, or unescaped JSON generated by LLMs without server round-trips.

LLM JSON Repair & Auto-Fixer: TOEA analyzes the structure of malformed JSON strings. It automatically fixes missing closing brackets/braces, removes trailing commas, converts single quotes to double quotes, quotes unquoted object keys, replaces Python constants (True/False/None), and escapes control characters inside strings. Runs 100% locally in your browser with zero server file uploads.

Runs
In your browser
Cost
Free · no sign-up
Availability
Ready to use

Repair Status Report

7 Fixes Applied ⚡
Applied Auto-Fixes:
  • 🛠️ Removed code comments
  • 🛠️ Replaced Python 'True' with 'true'
  • 🛠️ Converted single-quoted strings/keys to double quotes
  • 🛠️ Added double quotes to unquoted object keys
  • 🛠️ Removed trailing commas from objects/arrays
  • 🛠️ Closed unterminated string literal at end of input
  • 🛠️ Closed unclosed object brace '}'

A repaired truncation is still incomplete

When a model hits its output limit, the JSON stops mid-value. Closing the open strings and brackets makes it parse, but the last record is whatever was written before the cut: a string ends early, a number may be missing digits, and later fields are absent. When the list of fixes says a string or bracket was closed at the end, drop or re-request the final item rather than trusting it. The lasting fix is upstream: raise the output token limit, ask for fewer records per call, or use the provider's structured output mode.

Syntax fixed, shape unchecked

Valid JSON can still be the wrong JSON: a missing field, a number sent as a string, an extra wrapper object. Validate the repaired output against the schema you asked the model for with the JSON Schema validator before your code relies on it.

One fault has no safe automatic fix: a double quote inside a string value that was not escaped, as in "He said "yes"". Nothing in the text says where the value really ends, so correct it by hand.

How to use it

  1. Paste raw or truncated JSON output from an LLM.
  2. TOEA automatically fixes syntax errors, unescaped quotes, trailing commas, and unclosed brackets.
  3. Review the repair report, then copy or download the valid JSON result.

Privacy & limitations

Processing runs entirely in your browser RAM. Your data and API payloads are never transmitted to any server.

Related tools

Frequently asked questions

What types of JSON errors can it repair?

It fixes truncated JSON from token limits, trailing commas, single-quoted strings/keys, unquoted object keys, Python constants (True/False/None), unescaped newlines/tabs inside string literals, and JS code comments.

Does it alter string values?

No. It fixes syntax formatting and escapes raw control characters inside strings without changing content.

Free tool · runs in your browser · no account required