JSON Cleaner
Fix JSON copied from Slack, Word or email — smart quotes, invisible characters, comments and trailing commas.
Paste JSON copied from Slack, Teams, Word, email or a PDF — smart quotes, invisible characters, non-breaking spaces, // and /* */ comments and trailing commas are fixed.
About JSON Cleaner
The JSON Cleaner repairs JSON that got mangled on its way through a chat app, word processor or email client. When you copy a payload out of Slack, Teams, Word or a PDF, the app often swaps straight quotes for typographic “smart quotes”, turns spaces into non-breaking spaces and slips in invisible characters like zero-width spaces or a byte-order mark. The result looks identical on screen but fails every strict JSON parser with confusing errors like “Unexpected token” at a position that appears perfectly fine.
Paste the broken text and the cleaner replaces smart quotes with straight ones, converts exotic Unicode spaces to regular spaces, strips invisible characters and normalizes Unicode minus signs. It also removes the JSONC-isms strict parsers reject — // and /* */ comments and trailing commas, common in tsconfig.json or VS Code settings — without ever touching string values, so a URL like "https://…" survives. It then tells you exactly what it fixed, with counts, and validates the result. Everything runs in your browser; nothing is uploaded, so internal payloads are safe to paste.
How to use
- Paste the JSON you copied from Slack, Teams, Word, email or a PDF into "Pasted JSON".
- Choose what happens "After cleaning": keep the original formatting, pretty-print with 2 spaces, or minify to one line.
- Click "Clean". A report lists each kind of problem character found and how many were fixed.
- If the result is valid JSON you get a green confirmation; if something else is still broken (like a trailing comma), the parser error is shown so you can fix it in the output box.
Frequently asked questions
Why does JSON copied from Slack or Word fail to parse?
Those apps “beautify” text as you type or paste: straight quotes (") become curly quotes (“ ”), regular spaces become non-breaking spaces, and invisible characters such as zero-width spaces can ride along when you copy. JSON parsers are strict — a curly quote is not a string delimiter — so the payload fails even though it looks correct.
Exactly what does the cleaner fix?
Smart double and single quotes (including low, high, fullwidth and prime variants), non-breaking and other Unicode spaces, zero-width spaces and joiners, the byte-order mark, soft hyphens, text-direction marks, Unicode line and paragraph separators, Unicode minus signs or dashes in front of numbers, // and /* */ comments, and trailing commas before a closing bracket. Each fix is counted and reported.
Will it break URLs or comments inside my string values?
No. Comment and trailing-comma removal is string-aware: the cleaner tracks where quoted strings begin and end (including escaped quotes), so "https://example.com" or a value that happens to contain // is left exactly as it was.
Can it fix single-quoted strings, unquoted keys or missing brackets?
No — it never guesses at structure. If the cleaned output still fails to parse, the parser error is shown with the offending line and a caret pointing at the exact column, so you can fix the remaining issue by hand.
Could cleaning change my actual data?
Replacements apply to the whole text, including string values — so a curly apostrophe inside a value like “it’s” becomes a straight one. For payloads mangled by copy-paste that is almost always what you want, and the fix report shows every change so nothing happens silently.
