Clean pasted text (code-safe)
Fix copy/paste breakers that make JSON, CLI commands, API keys, and copied code fail:
remove invisible Unicode characters (zero-width/bidi/joiners), convert smart quotes, and normalize weird spaces and dashes — with a transparent report.
— changed
— input chars
— output chars
— line endings (as received by browser)
What was found / fixed
This report is the point: it shows exactly what was detected (and what was changed, if you apply fixes).
Why copy/paste breaks code
- Smart quotes ( “ ” ‘ ’ ) look like quotes, but JSON/code expects
" or '.
- Weird spaces (NBSP, thin spaces, ideographic spaces) look normal but break parsing, trimming, or string equality.
- Zero-width & joiners are invisible and can corrupt tokens, URLs, and identifiers.
- Bidi/directional marks can make text look identical while the underlying bytes differ.
Clean pasted text for code, JSON, and CLI commands
If you’ve ever pasted a command and the terminal says “unknown option”, or your JSON parser throws an error even though the text “looks fine”,
the cause is often hidden Unicode characters. This page helps you remove zero-width characters, convert smart quotes to straight quotes,
and normalize non-breaking spaces so copied text becomes safe for code and configuration.
Common situations this tool fixes
- JSON fails to parse because of smart quotes (“ ”) or invisible characters.
- Copied CLI flags break because a dash is actually an en dash (–) or em dash (—).
- API keys/tokens fail because a zero-width character was inserted by PDF/Docs.
- Strings don’t match because of non-breaking spaces or other “weird spaces”.
- Bidi marks (directional Unicode) make “what you see” different from “what you run”.
How to use it
Start with Audit only to scan without changes. If the report shows suspicious characters (like [ZW] or [BIDI]),
click Apply fixes and then Copy cleaned. For JSON, use JSON safe and press Try parse JSON.
What “weird spaces” means
Weird spaces include non-breaking space (NBSP), thin spaces, em/en spaces, and ideographic space. They can look like a normal space but behave differently.
In code, configuration, and tokens, these characters can cause hard-to-debug errors.
FAQ
Does Audit only change my text?
No. Audit only scans the input and shows markers + a report. Use “Apply fixes” to generate cleaned output.
Why does the tool sometimes report LF line endings even if I copied from Windows?
Browsers often normalize line endings on paste before JavaScript receives the text. That’s why line-ending conversion is in Advanced and verified by tests.
Will this reformat or minify my code?
No. It only targets common copy/paste breakers (quotes, weird spaces, invisibles, dashes). It does not reindent, minify, or rewrite syntax.
What should I do if nothing changes but my code still fails?
Use “Detect tabs” and “Detect trailing spaces”, and for JSON use “Try parse JSON”. If those pass, the issue is likely not copy/paste characters.
References & further reading
Authoritative sources about Unicode characters that commonly break copy/paste in code and configuration.
-
Unicode Standard Annex #9 — Bidirectional Algorithm
Open
-
Unicode Standard — Variation Selectors (U+FE00–U+FE0F)
Open
-
Unicode Character Database (UCD) — general data and properties
Open
-
RFC 8259 — The JSON Data Interchange Syntax
Open
Tip: if a link opens in a new tab, it uses rel="noopener noreferrer" to prevent tab-nabbing.