EN
My tools

JSON Repair (Fix Broken JSON)

Fix broken JSON: trailing and missing commas, single or smart quotes, unquoted keys, comments, Python True/None, not-a-number values, code fences and cut-off endings.

Repaired JSON
Status
Repaired (12 fixes)
Fixes applied
12

Repairs follow common mistakes and are guesses where the text is ambiguous — check the fixes against what the data should be.

What was fixed
LineFix
2Removed the ``` code fence around the JSON.
3Added a missing } at the end (the object was cut off).
4Removed a // comment.
5Put the key name in double quotes.
5Changed single quotes to double quotes.
6Changed Python True to true.
7Removed a trailing comma before ].
8Changed smart quotes “ ” to straight double quotes.
9Added a missing comma between members.
9Changed NaN to null (JSON has no NaN or Infinity).
10Added a missing } at the end (the object was cut off).
10Added a missing ] at the end (the array was cut off).
My tools →
Advertisement

JSON breaks for small reasons: a trailing comma, single quotes, an unquoted key, a comment, Python's True and None, NaN, a code fence around it, or output that was cut off half-way. Strict parsers reject all of these. This tool reads the text leniently, repairs what it can, prints valid JSON, and lists every fix with its line number so you can check that the repair matches what the data should be. Valid JSON passes through unchanged.

How to use this tool

  1. Paste the broken JSON — leftover prose, ` fences and JSONP wrappers are fine.
  2. Choose indented or minified output.
  3. Read the list of fixes and check the doubtful ones (for example a quote inside a string).
  4. Copy the repaired JSON.

Formula

lenient read → repaired value → strict JSON (RFC 8259) → checked with a strict parser

Fixed: comments (//, /* */, #), trailing and doubled commas, missing commas between members or items, single, backtick and smart quotes, unquoted keys and text values, = instead of :, missing values (null), Python True/False/None, undefined, NaN and ±Infinity (→ null), +1, .5, 007 and hexadecimal numbers, raw line breaks in strings, invalid escapes, strings joined with +, wrappers such as ObjectId("…"), a JSON document stored inside a string, several concatenated values (→ array) and missing closing quotes, brackets and braces at the end. Large integers keep all their digits.

Example

The sample has prose and a code fence around it, a // comment, an unquoted key with a single-quoted value, Python True, a trailing comma in tags, smart quotes around "first programmer" with no comma after them, NaN, and a cut-off ending. The result is a valid object with name "Ada Lovelace", active true, tags ["math", "poetry"], note "first programmer", score null and both orders, the second closed as {"id": 2, "total": 12}.

Frequently asked questions

Is the repaired JSON always what I meant?

Not always. Where the text is ambiguous — a quote inside a string, a missing comma — the tool makes the most likely choice and lists it. Check those lines, especially for data that came from a truncated response.

Why did NaN become null?

JSON (RFC 8259) has no NaN or Infinity; JavaScript's JSON.stringify writes null for them too, so null is the standard replacement.

Does it change valid JSON?

No. If the input already parses, the status says so and the output is only re-indented.

Is my data uploaded?

No. The repair runs in your browser.

Sources

Last updated:

Cite or embed this tool
APA

kakaoCalc. (2026, November 8). JSON Repair (Fix Broken JSON). https://kakao.mobile/tools/json-fixer-tool/

MLA

“JSON Repair (Fix Broken JSON).” kakaoCalc, 8 Nov. 2026, kakao.mobile/tools/json-fixer-tool/.

Paste this code into your page. The widget runs in your visitors' browsers, shows no ads and keeps a link back to this page. Embedding terms

Advertisement