Invisible and Look-Alike Character Finder
Operator: Abdulla Al Fahad. How tools are built and checked
A product code that will not match in a spreadsheet lookup, a name that fails a search even though it looks identical, a character count that is two higher than the words you can see. The cause is often a character that has no visible shape: a zero-width space pasted in from a web page, a non-breaking space from a word processor, or a Cyrillic "о" standing in for a Latin "o".
This page scans pasted text or a small text file, marks each such character in place with its code point, lists them in a table with the line and column of the first five of each kind, and gives you a cleaned copy. It cleans text. It does not tell you where the text came from, and it makes no claim about hiding or revealing machine-written text.
Key features
- Text view with each hidden character shown as a coloured U+ marker
- Table of code point, name, kind, count and the line:column of the first five occurrences
- Columns counted in characters (code points), so an emoji counts as one
- Options to remove invisible characters, normalise unusual spaces and swap look-alikes for Latin letters
- Variation selectors listed only on request, because emoji rely on them
- Copy the cleaned text or download it as .txt
- Per-run counts of characters removed, spaces normalised and look-alikes replaced
The invisible characters and look-alikes it checks
Input is plain text from the box or a .txt or .md file up to 5 MB. Binary files such as documents or images are turned away. A leading U+FEFF is kept in the text and reported, so you can see a stray byte-order mark.
Categories scanned: zero-width characters (U+200B to U+200D, U+2060, U+FEFF); direction controls (U+202A to U+202E, U+2066 to U+2069, U+200E, U+200F, U+061C); the soft hyphen U+00AD; unusual spaces (U+00A0, U+2000 to U+200A, U+202F, U+205F, U+3000); tag characters (U+E0000 to U+E007F); other format characters such as invisible math operators, the combining grapheme joiner and Hangul fillers; and, only when you switch them on, variation selectors.
Look-alikes come from a table of common pairs: Cyrillic letters such as а, е, о, р, с, х, у, і and capitals А, В, Е, К, М, Н, О, Р, С, Т, Х, plus Greek capitals such as Α, Β, Ε, Ο, Ρ, Τ and the lower-case ο, ν, ρ. A letter is flagged only inside a word that otherwise contains Latin letters and no other Cyrillic or Greek letters, so a word written entirely in Russian or Greek is left alone.
How it works
The text is split into code points and walked once. Each code point is checked against the category ranges above; line numbers advance at each line feed and the column restarts at 1. The first column is the first character of a line.
For look-alikes, runs of letters and digits are treated as words. A run is eligible when it contains at least one Latin letter and no Cyrillic or Greek letter outside the look-alike table; every table letter inside it is then flagged. Replacement uses the Latin letter the table pairs it with.
Cleaning builds a new string: flagged characters in the remove group are dropped, unusual spaces become U+0020 and flagged look-alikes become Latin letters, each only if its option is ticked. Characters not flagged are copied unchanged.
Common use cases
- Finding why a pasted customer name fails an exact match in a database or spreadsheet
- Checking a text snippet for direction-control characters before it is placed in source code or a config
- Replacing non-breaking spaces that make columns of numbers sort or split wrongly
- Spotting a mixed-script word in a username, domain label or product name
- Removing soft hyphens left in text copied from a justified PDF or a web article
How to use this tool
- Paste the text that misbehaves, or load a .txt or .md file. Use the sample to see markers for several kinds, including an unusual space, a soft hyphen, a tag character and an invisible separator; tick the variation selector option to mark the one after the heart.
- Read the line above the view: it states how many characters were flagged out of how many scanned.
- Find the markers in the view and match them against the table. Hover a marker for its code point and kind.
- Choose which cleanups to apply. Leave variation selectors off unless the text contains no emoji you want to keep.
- Copy the cleaned text, or download it as a .txt file.
Example
Two short strings
pass and Hello wоrld (the o is Cyrillic)Findings and cleaned text
U+200B ZERO WIDTH SPACE: 1 at line 1, column 3
U+043E CYRILLIC LETTER looking like Latin "o": 1
Cleaned: pass and Hello worldTips for best results
- A non-breaking space is not wrong in typography. Replace it only where a program, not a reader, will use the text.
- Scan first and clean second: the table tells you what you are about to change.
- If a word in your own language contains a flagged letter, check whether it is truly a look-alike: the tool flags by shape and table, not by language.
- Open the cleaned file in the program that failed and test the original problem again.
Common pitfalls
Removing zero-width joiners (U+200D) breaks some emoji sequences, such as a family or a profession emoji, and changes joining in several scripts. Check emoji after cleaning.
Zero-width non-joiners (U+200C) are required for correct spelling in Persian and some other languages. If your text is in such a language, untick removal for that text.
Tag characters also build flag sequences for regions like England and Scotland. Removing them turns that flag into a plain black flag.
Look-alike detection needs at least one Latin letter next to the odd letter. A single Cyrillic letter on its own, or a word fully made of table letters, is not flagged.
Characters not in the tables, such as other homoglyphs from Armenian, Cherokee or mathematical alphabets, are not detected.
Common errors and how to fix them
- The page says the text is over 5 MB.
- Check the file in parts: copy a few thousand lines at a time, or cut the file in a text editor first.
- The file is refused as binary.
- A NUL byte was found near the start. Choose a plain text file, or copy the text out of the program that made the file and paste it.
- Nothing is flagged but the problem remains.
- The cause may be a visible difference, such as a straight versus curly quote, a different dash or trailing spaces. Compare the two strings character by character in a code editor.
Best practices
- Keep the original text until the cleaned version has been checked in the destination.
- Clean data fields rather than prose when you can; prose may legitimately use non-breaking spaces and soft hyphens.
- Record what you removed (the table lists it) when you clean text that others will compare with the source.
What each kind of character does
Zero-width space and word joiner mark line-break opportunities or forbid them without showing anything. Direction controls change the order in which parts of a line are drawn, which is why text can look different from its stored order. A soft hyphen is invisible until a line wraps there. Unusual spaces look like a space but compare differently from U+0020, so searches and splits miss them.
Variation selectors choose between text and emoji looks of a symbol, which is why they are off until you ask for them. Tag characters were defined for language tagging and are removed by default here; they are invisible, so text can carry them without showing anything, and they are part of some flag emoji.
Privacy
The scan and the cleaned copy are made by script in the open page. The text you paste or load is not included in any request from this tool, and it is not kept after you leave.
Frequently asked questions
Does this show whether text was written by a person or a program?
No. It lists characters that are invisible or easily confused and lets you remove them. Text can contain them for many ordinary reasons, and text without them can come from anywhere.
Why is a BOM reported as a zero-width character?
U+FEFF is the zero width no-break space. At the start of a file it normally acts as a byte-order mark, and in the middle of text it is a stray invisible character. Both are listed.
How are columns counted?
In characters, starting at 1 for the first character of each line. A line break is a line feed; a carriage return before it counts as a character at the end of the previous line.
Why did the Greek or Cyrillic word I wrote stay as it was?
Words with no Latin letters are skipped, because the tool only flags letters that appear inside otherwise Latin words.