Waiting for JSON content
Start typing on the left or load one of the sample payloads to inspect it instantly.
Instantly clean, validate, and inspect web payloads
Start typing on the left or load one of the sample payloads to inspect it instantly.
Automatically fix broken JSON online. Auto-repair single quotes, missing key quotes, trailing commas, JavaScript comments, Python literals, and AI/LLM output errors.
Every tool runs in your browser, so the JSON you paste never leaves your device.
Formatting, minifying, repairing, and the tree view all run on your device, so there are no uploads to wait on.
Syntax errors like unescaped quotes and trailing commas are flagged with their exact line and column.
The everyday problems that break JSON and how the repair tool fixes them while keeping your data intact.
Most JSON that fails to parse is not badly broken — it is real data with a few small problems. You copy a Python dictionary, a JavaScript object, or a truncated line from a log, and it almost looks like JSON but breaks the strict rules. The PrettyJSON repair tool works through these common problems in order and turns the input into valid JSON, keeping your keys and values as they are. It runs entirely in your browser, so nothing you paste is uploaded.
Two of the most common problems are single quotes instead of double quotes, and keys with no quotes at all — both are normal in JavaScript and Python but invalid in JSON. Repair converts single quotes to double quotes and adds quotes around unquoted keys, while being careful not to change quotes that appear inside string values. Python-style values like True, False, and None are converted to true, false, and null.
// Input (JavaScript / Python style)
{ id: 101, 'user': 'Alice', active: True, tags: ['dev',], }
// Repaired (valid JSON)
{
"id": 101,
"user": "Alice",
"active": true,
"tags": [
"dev"
]
}JSON does not allow comments or a comma after the last item, but both sneak in constantly when JSON is copied out of code. Repair removes line and block comments and strips trailing commas from objects and arrays. It also handles truncated data: if a response was cut off and is missing its closing brackets or braces, repair adds the missing ones in the right order so the structure is complete again.
Common questions and expert answers regarding this tool.
It fixes the common problems that break JSON: single quotes, unquoted keys, comments, trailing commas, missing closing brackets, and Python values like True, False, and None. Your keys and values are kept as they are.
Usually, yes. Python dictionaries often use single quotes and True, False, or None. Repair converts the quotes and those values so the result is valid JSON.
Repair strips wrapping junk around the JSON and, if the data was cut off, adds the missing closing brackets and braces so the structure is complete again.