Find the invisible characters in your text
Paste your text into the panel above and every character that is not what it looks like is marked where it sits, named, and left there until you say otherwise. Zero-width spaces, non-breaking spaces, smart quotes, soft hyphens and the direction marks all show up in place with a label you can click to remove that one occurrence. Taking out the invisible ones, flattening odd whitespace and straightening punctuation are three separate jobs, and only the first is ticked to begin with.
See exactly where they are before anything is taken out
Paste anything in and every character that is not what it looks like is marked where it sits, named, and taken out only if you say so. The other tools in this category quietly rewrite your text and hand it back, which is no help at all when you are trying to find the one that broke.
Nothing hidden in this. Every character here is the one it looks like.
Your text stays in this tab. The scan and every removal run beside the box and there is no code on this page that could send what you paste anywhere. It knows 56 characters, which is the set that actually turns up in text out of Word, a CMS, a PDF or a chat window. A character it does not know is left exactly where it is rather than guessed at.
Invisible character remover, step by step
- Paste the text that is misbehavingThe whole thing, not the line you suspect. The character that breaks a file is usually somewhere nobody looked, and this costs nothing to scan.
- Read the marksEach one sits exactly where the character is and carries its code point. Underneath, every kind found is named with where it usually comes from and what it breaks.
- Take out only what you want goneOne mark, every occurrence of one character, or a whole job. Nothing is changed until you press something, and the box updates in place so you can look again.
Why a character with no width breaks a search that should have matched
A string comparison is a comparison of code points, and nothing else. Two lines that look identical on screen are unequal if one of them has a zero-width space in the middle, because to every piece of software involved that is a character like any other: it has a code point, it takes up a position, and it makes the two strings different lengths. Nothing renders it, so there is no way to see the difference and no reason to suspect one. That is the whole mechanism behind the usual symptoms. A search finds nothing because the word in the box and the word on the page are not the same word. A lookup fails on an identifier that was copied out of a wiki. A CSV gains a column because a non-breaking space is not the space the splitter was told about. A JSON parser refuses a file whose first three bytes are a byte order mark that a text editor politely hides. The scan here reads the string one code unit at a time against a table of the characters that actually turn up in text out of Word, a CMS, a PDF or a chat window, and reports the position of each. Everything above the table is presentation; the table is the tool.
The reason this category of tool exists is that text moves between programs that disagree about what text is. A word processor thinks in typography, a spreadsheet thinks in cells, a terminal thinks in bytes, and a web page thinks in whatever the person who wrote the CMS was thinking about. Every one of those hand-offs can leave a character behind that looks like nothing and behaves like something.
The reason this particular one exists is that the others do not show you anything. You paste, they hand back a cleaned version, and you are no wiser about what was wrong. That is fine right up until the cleaned version is also broken, or until it turns out the tool straightened forty apostrophes you wanted to keep on the way to removing the one zero-width space you came for. Being told what was there is the difference between fixing a problem and running a text through a machine and hoping.
There is a practical order to it. Scan first and read what came back, because the answer is often surprising and is occasionally the whole diagnosis: a file that will not parse and turns out to have a byte order mark on the front does not need cleaning, it needs saving differently. Then take out the invisible characters, which is nearly always safe. Only then look at whether the punctuation and the whitespace ought to change, and that depends entirely on where the text is going. Prose keeps its curly quotes. A command line does not.
Questions
Where do these characters come from in the first place?
Mostly from software being helpful. Word and Google Docs turn straight quotes into curly ones and three full stops into a single ellipsis character. A CMS inserts zero-width spaces so long words can wrap. A PDF carries soft hyphens marking where a word was allowed to split across lines, and they come with the text when you copy it. Text written by a language model tends to arrive with typographic punctuation because it was trained on prose that had been typeset.
Why not just strip everything in one go?
Because the three jobs are not the same job and conflating them is how these tools surprise people. Taking out a zero-width space is almost always right, since nobody typed it and nothing renders it. Turning a curly quote into a straight one changes how the text reads, and plenty of writing wants to keep them. Flattening a non-breaking space changes where a line is allowed to break, which is sometimes the only reason it was there. So they are separate ticks, and only the safe one is on when the page opens.
Is a non-breaking space really a problem?
It is the single most common one, and the most quietly annoying. It looks exactly like a space, sorts differently, and is not what a trim function or a split on whitespace is looking for. A name pasted out of a document will not match the same name typed by hand. A price with one in front of the currency symbol fails a number parser. Nothing about it looks wrong on screen, which is why it survives every review it goes through.
Does my text get sent anywhere?
No. The scan runs beside the box in the page you are reading, and the removals happen in the same place. There is no code on this page that could send what you paste anywhere, because there is nowhere for it to go. It is a page of static files with nothing behind it, and the tool itself is a table of characters and a loop over your string, running in the tab you already have.
What does the code point next to each mark mean?
It is the character's number in Unicode, written the way Unicode writes it. U+200B is the zero-width space, U+00A0 is the non-breaking space, U+2019 is the curly apostrophe. It is worth having because it is searchable. Paste one into a search engine and you get the definitive answer about what the character is and what it is for, which a picture of an empty box cannot give you.
Other things here
There is a full list on the free tools page. They all work the same way: in the browser, with nothing to install.
The tool is free. So is the thought.
This page did one small job. Edmund is for the thing you thought of while doing it: a capture app for iPhone, iPad and Mac that files a note the moment you have it, so it does not get lost between having it and writing it down.
See what Edmund does