Copied text often carries invisible or look-alike characters, such as zero-width spaces, non-breaking spaces, curly quotes and byte order marks. They look normal on screen but software treats them as different characters, which breaks searches, formulas, code and passwords. Pasting the text into a cleaner removes them.
The usual suspects
| What you see | What's really there | What it breaks |
|---|---|---|
| A normal space | Non-breaking space (U+00A0) | Searches, Excel numbers, CSV files |
| Nothing at all | Zero-width space (U+200B) | Passwords, searches, word counts, code |
| Nothing at the start | Byte order mark (U+FEFF) | First column of a CSV, scripts |
| A quote mark | Curly quote “ ” instead of " | Code, formulas, command lines |
| A hyphen | En or em dash – — | Command-line options, IDs, phone numbers |
| A Latin letter | Look-alike Cyrillic letter | Searches, logins, domain names |
Where they come from
- Web pages use non-breaking spaces to keep things together and zero-width spaces to let long words wrap.
- Word and Google Docs turn straight quotes into curly ones and double hyphens into dashes as you type.
- PDFs often scatter spaces and joiners between letters when you copy from them.
- Chat and AI apps format their answers for display, and some of that formatting comes along when you copy.
- Spreadsheets and CSV exports sometimes start with a byte order mark.
How to fix it
- For one-off text: paste it into the invisible character checker, look at what lights up, and copy the clean version. Look-alike letters from other alphabets aren't flagged yet.
- For plain pasting: use paste without formatting (Ctrl+Shift+V on Windows, Cmd+Shift+Option+V on a Mac). This drops fonts and colours, but not invisible characters.
- In Excel:
=CLEAN(SUBSTITUTE(A1, CHAR(160), " "))handles the most common cases.CLEANremoves control characters but not zero-width spaces. - In code editors: turn on the option that shows invisible or control characters, and search for the code point, for example
.
Prevention
Type short things like passwords and IDs by hand rather than copying them. When you build forms or import scripts, strip zero-width and non-breaking characters on input. Most hard-to-explain it looks right but doesn't work problems disappear.