JSON Repair
Paste JSON with common mistakes — trailing commas, single-quoted strings, unquoted keys, comments, or Python-style True/False/None — and fix it automatically. Runs entirely in your browser.
How to use it
- Paste malformed JSON, drop a local text file, or load the built-in example.
- Choose Repair or press Ctrl/⌘ + Enter.
- Review the formatted result. If safe repairs are not enough, use the reported line and column to fix the remaining structural error.
- Copy or download the result, then send it to JSON Validator for a second check when the payload is important.
Broken JSON repair example
A JavaScript object literal or Python-style dictionary often looks almost like JSON but fails in a strict parser:
{
name: 'Ada',
active: True,
roles: ['admin', 'editor',],
note: None, // imported from Python
}
The repair tool quotes the property names, converts single-quoted strings, removes the comment and trailing commas, and maps True to true and None to null. The output is strict JSON:
{
"name": "Ada",
"active": true,
"roles": ["admin", "editor"],
"note": null
}
Repairs applied automatically
Cryonel targets a small set of predictable syntax differences: line and block comments, single-quoted strings, unquoted identifier-style keys, trailing commas, raw control characters inside strings, and Python literals such as True, False, and None. Non-JSON numeric values including NaN and Infinity become null because standard JSON has no equivalent value.
Repairs are performed locally and the repaired text is parsed again before it is labeled valid. This second parse is important: a transformation can clean familiar syntax without being able to infer the intended document structure.
Errors that require manual review
The tool intentionally avoids guessing when a comma is missing between properties, a bracket is mismatched, a string is cut off, or two fragments were accidentally joined. Automatically inventing structure could silently change data. In these cases Cryonel keeps the safely transformed output visible and reports the remaining parse position so you can repair the source deliberately.
Always review changes before using repaired data in production. Pay particular attention to identifiers, money, timestamps, booleans, and values converted to null. JSON Repair corrects syntax; it cannot know whether a value is semantically correct for your application.
Practical uses for JSON repair
- Convert a copied JavaScript configuration object into a strict API request body.
- Clean a Python dictionary dump before importing it into a JSON-only system.
- Remove comments and trailing commas from JSONC-style configuration.
- Recover a webhook sample or log fragment with common quoting mistakes.
For a safe workflow, keep the original input, repair a copy, validate the result, and compare important payloads before replacing any stored data. Files are read with the browser’s local file API and are not sent to Cryonel.
Frequently Asked Questions
What kinds of errors can this fix?
Syntax-level issues common in JS object literals, JSON5, or Python dict dumps: trailing commas, single quotes, unquoted keys, // and /* */ comments, and True/False/None/NaN/Infinity literals.
Can it fix mismatched brackets or missing commas?
No — structural errors like an unclosed { or a missing comma between fields can't be fixed automatically without guessing intent. Those are reported as a parse error after the safe fixes are applied.
Is this the same as JSON5?
The accepted input is similar to JSON5/JSONC, but the output is always strict, standard JSON — safe to use anywhere a JSON parser is expected.