RealJSON
Try now

JSON Repair — Fix Broken JSON

Paste broken JSON and get it fixed automatically. Handles trailing commas, single quotes, Python literals, unquoted keys, and JS comments.

Broken JSON

Repaired JSON

In short: A JSON repair tool automatically detects and fixes common syntax problems — trailing commas, single quotes, unquoted keys, Python literals like True/False/None, and JS-style comments — that would otherwise make JSON fail to parse. RealJSON's repair tool fixes these in your browser and shows you a summary of exactly what it changed.

Automatic JSON Repair

JSON is strict — a single trailing comma or unquoted key breaks the whole document. This tool automatically detects and corrects the most common JSON errors so you don't have to hunt them down manually.

What Gets Fixed

Trailing Commas

Commas before closing ] or } are valid in JavaScript but invalid in JSON. They're stripped automatically.

Single Quotes

JSON requires double quotes. Single-quoted strings and keys (common when hand-editing or copy-pasting from JavaScript) are converted to their double-quoted equivalents.

Unquoted Keys

Object keys must be quoted strings in JSON. Bare keys like { name: "Jane" } are automatically wrapped in double quotes.

Python Literals

Python's True, False, and None are converted to JSON's true, false, and null. Useful when pasting output from Python's print(dict).

JavaScript Comments

Single-line // comments and block /* comments */ are stripped before parsing.

Frequently Asked Questions

How do I fix broken JSON online?

Paste the broken JSON into the repair tool. It automatically corrects common problems — trailing commas, single quotes, unquoted keys, Python literals, and JS-style comments — and shows a summary of what it changed.

Can it fix JSON copied from a Python dictionary?

Yes. Python's True, False, and None are converted to JSON's true, false, and null, and single-quoted strings become double-quoted — common when pasting the output of print(dict).

Does the tool remove comments from JSON?

Yes. Single-line // comments and block /* comments */ — valid in JavaScript object literals (JSONC) but not in standard JSON — are stripped before parsing.

What does the tool do with trailing commas and unquoted keys?

Trailing commas before closing brackets or braces are removed, and bare object keys like { name: "Jane" } are wrapped in double quotes to become { "name": "Jane" }.

Is my broken JSON uploaded to a server to be repaired?

No. The repair logic runs entirely in your browser using JavaScript — your data is never sent to any server.

Related Tools

After repairing, use the JSON Validator to confirm the output is fully valid, or the JSON Formatter to pretty-print it.

Browse all free JSON tools →