Large files are kept out of the editor so typing stays smooth. Hit the button below to process it.
Aempty
file.json
Bempty
file.json
Or press Ctrl+Enter · max 50MB
Formatted
No differences — these two documents hold the same value.
{ }
Your formatted JSON will appear here.
Two-space indent, syntax highlighted, ready to copy.
That doesn’t look like valid JSON
That wasn’t valid JSON — so it was repaired
Preview truncated for speed — the full document is intact. Use Copy or Download to get all of it.
Paste the JSON you actually have
Not every “JSON” is JSON. A config file with comments, a JavaScript object with bare keys, a Python dict printed with True and None, a chat assistant’s answer wrapped in “Sure! Here you go:” and a ```json fence, an API response cut off mid-string. Every one of those fails JSON.parse. Paste it here, press Fix JSON, and you get valid, formatted JSON back.
Everything runs in your browser. Your JSON is parsed by a Web Worker on your own machine and never sent anywhere — there is no upload, no account, and no server-side processing. You can check: open the network tab and format a file, and you will see no requests. Here is why that matters, and how to verify it on any tool.
Every change is listed
A repair that quietly rewrites your data is worse than an error. So alongside the result you get a list of exactly what was changed and the line it first happened on — “Removed 2 trailing commas · line 4”, “Converted 3 Python literals”, “Closed 2 brackets left open — the input looks cut off”. Read it, then copy the result, download it, or put it straight back into the input.
What it repairs
Chat assistant output — prose before and after, Markdown code fences, and replies that stopped mid-object
Commas — trailing, doubled, or missing between items
Quotes — single quotes, curly “smart” quotes from documents and chat apps, unquoted keys, and unescaped quotes inside strings
Comments — //, /* */ and #
Python and JavaScript values — True, False, None, undefined, NaN and Infinity
Truncated documents — open strings, arrays and objects are closed, and a key left with no value is dropped
Strings — raw line breaks and tabs, invalid escapes such as Windows paths
Numbers — hex, a leading + or ., leading zeros
Several documents at once — NDJSON or pasted-together objects become an array
JSON inside a string — "{\"a\":1}" from a log line or a database column is unwrapped
When it will not guess
If the input stops looking like structured data at all — an HTML page, a sentence with no braces in it — the repair gives up rather than inventing something. You get the usual precise error instead: line, column, and the offending token selected in your input.
Questions
Will it change my data?
Only what it has to for the input to parse, and every change is listed with its line. Values are never reordered, renamed or reformatted beyond that — a number stays the same number and a string the same string.
Why does ChatGPT give me invalid JSON?
Language models write text that looks like JSON, and usually is, but they add a sentence before it, wrap it in a code fence, leave a trailing comma, or run out of tokens halfway through. All of those are repaired here.
Is my JSON uploaded to fix it?
No. The repair runs in a Web Worker in your browser. Nothing is sent anywhere — the page’s security policy blocks outgoing connections entirely, and it keeps working with your network switched off.
What if the JSON was cut off?
Open strings, arrays and objects are closed at the cut-off, and a key that never got its value is dropped. The result is valid, but it is still missing whatever came after — the list of changes says so.
Found a bug? Want another tool?
This site has no accounts, no analytics and no error reporting — which also means nothing
tells me when something breaks. If a file failed to parse, a conversion came out wrong, or
you keep reaching for a tool that isn’t here yet, send it over and it gets looked at.