Skip to main content
CuteJSON
↑↓ Navigate Enter Select Esc Close

JSON Repair

Turn a JavaScript object literal or a commented config into real JSON, with an itemised list of every change.

Back to all tools

Keyboard shortcuts

These work wherever the matching action exists on this page.

Open the command palette
Ctrl/Cmd + K
Run the main action
Ctrl/Cmd + Enter
Format
Ctrl/Cmd + Shift + F
Minify
Ctrl/Cmd + Shift + M
Copy output
Ctrl/Cmd + Shift + C
Open file
Ctrl/Cmd + Shift + O
Download output
Ctrl/Cmd + S
Close this dialog
Esc
Open this dialog
F1 / ?

Local data

Everything below is stored only in this browser, on this device. None of it is ever sent anywhere, and closing this dialog is not required for that to stay true.

Unsaved drafts
Tools with remembered options

Recently opened files

    No files opened yet on this device.

    Share via link

    The content is packed into the part of the link after the # sign, which browsers never send to a server. Nothing here is uploaded to cutejson.com or anywhere else.

    Shares the first input on this page. On a tool with more than one, only that one is included.

    Nothing to share yet. Paste or type something first.

    Input

    Load from a URL

    Fetches the URL directly from your browser and loads whatever text it returns into this pane.

    Output

    The result appears here.

    Runs entirely in your browser. Nothing you paste is uploaded, and you can confirm that in your browser Network tab.

    About this tool

    Most repair tools fix your document silently, which teaches you nothing and hides the cases where the fix was not what you meant. This one lists every change with its line number, so you can check the result rather than trust it. That matters most for values JavaScript allows and JSON cannot express: NaN, Infinity and undefined all become null, which changes your data rather than just its punctuation. Those are called out separately for exactly that reason. When a document is too broken to rescue, the tool says so and shows the remaining error instead of handing back something that still will not parse. An optional "Extract from surrounding text" toggle looks for the JSON value itself first, inside a Markdown code fence or among ordinary prose, for the common case of pasting a whole chat reply rather than only the part that matters. A document that simply stops partway through, the common shape of a reply cut off by a token limit, is closed rather than rejected: an unterminated string gets its closing quote, and any object or array still open gets its closing brace or bracket, with a value only ever invented for a key that was read but never given one.

    How to use

    1. Paste the broken JSON into the input pane, or load the sample.
    2. Press Repair. The fixed document appears on the right.
    3. Read the list of changes underneath, then copy or download the result.
    4. Optionally, check "Check against a schema" and paste an OpenAPI or JSON Schema to see whether the repaired result matches it.
    5. Pasting a whole chat reply rather than just the JSON? Check "Extract from surrounding text" first, so the tool finds the value before repairing it.

    Keep reading

    How to fix broken JSON automatically, and see every change Read the guide