Identify Invisible Unicode and Space Characters
How blank and invisible Unicode characters work, how to identify them by code point, how to type them, and when a plain space is the safer choice.
The short answer: is an invisible character right for your use?
A blank or invisible Unicode character is useful when you need a specific behavior that an ordinary space cannot give you. Examples include keeping two words on the same line, allowing a line break inside a long string without showing a hyphen, controlling how Arabic or Persian letters join, or fixing the display order of mixed left-to-right and right-to-left text. In those cases the character has a documented purpose, and software that follows the Unicode Standard is designed to handle it.
The main tradeoff is that you cannot see what you have inserted. A string that looks empty, or looks like a normal space, may contain a character that breaks search, sorting, form validation, code, passwords, or screen reader output. Some platforms also strip or replace these characters. A plain space (U+0020) is the better choice for ordinary prose, data fields, file names, URLs, identifiers, and anything people will need to search, edit, or read with assistive technology. Use "blank name" or "empty message" tricks only if you accept that they may stop working or be removed without notice.
What these characters actually are
Each invisible or blank character is a real stored character with its own code point, like any letter. Inserting one changes the underlying text, not just its appearance. This is different from visual formatting such as CSS spacing, padding, or the way HTML collapses several ordinary spaces into one when it displays a page. With CSS, the stored text stays the same and only the presentation changes. With an invisible character, anything that copies, indexes, or compares the text will see the extra character.
Invisible characters fall into a few groups, and the group tells you more than the appearance does:
- Space separators (Unicode general category Zs): characters that display as horizontal space, such as the ordinary space, the no-break space, and typographic spaces of different widths.
- Format characters (category Cf): characters with no visible glyph that change how nearby text breaks, joins, or orders itself, such as the zero width space, zero width joiner, and directional marks.
- Visible-category characters that often render blank: characters that are officially letters or symbols but have an empty glyph in many fonts, such as the Hangul filler and the Braille pattern blank. These are commonly used for blank names because some systems reject true spaces but accept them.
- Control characters: legacy ASCII controls such as tab, carriage return, and the null character. These are not spaces in the typographic sense and are often rejected or rendered unpredictably.
Common blank and invisible characters
The table lists characters you are likely to meet when inspecting text that looks blank. Category codes come from the Unicode Character Database. Rendering and handling still depend on the font and application.
| Code point | Name | Category | Typical behavior |
| U+0020 | SPACE | Zs | The ordinary space; the only space character in printable ASCII |
| U+00A0 | NO-BREAK SPACE | Zs | Looks like a space but prevents a line break; not collapsed by HTML |
| U+2002 | EN SPACE | Zs | Wider fixed-width typographic space |
| U+2003 | EM SPACE | Zs | Wider still; often used for indentation in plain text |
| U+2009 | THIN SPACE | Zs | Narrow space, used in some number and unit formatting |
| U+200A | HAIR SPACE | Zs | Very narrow space |
| U+202F | NARROW NO-BREAK SPACE | Zs | Narrow space that also prevents line breaks |
| U+3000 | IDEOGRAPHIC SPACE | Zs | Full-width space used with Chinese, Japanese and Korean text |
| U+200B | ZERO WIDTH SPACE | Cf | No width; marks a permitted line-break point |
| U+200C | ZERO WIDTH NON-JOINER | Cf | Prevents adjacent letters from joining, used in Persian and other scripts |
| U+200D | ZERO WIDTH JOINER | Cf | Requests joining; also used to build multi-part emoji sequences |
| U+2060 | WORD JOINER | Cf | No width; prevents a line break |
| U+FEFF | ZERO WIDTH NO-BREAK SPACE / BYTE ORDER MARK | Cf | Often appears invisibly at the start of files |
| U+00AD | SOFT HYPHEN | Cf | Usually invisible; shows a hyphen only where a line breaks |
| U+200E | LEFT-TO-RIGHT MARK | Cf | Invisible; influences bidirectional display order |
| U+200F | RIGHT-TO-LEFT MARK | Cf | Invisible; influences bidirectional display order |
| U+061C | ARABIC LETTER MARK | Cf | Invisible directional mark intended for Arabic-script text |
| U+3164 | HANGUL FILLER | Lo | A letter by category; often renders blank, sometimes as a box |
| U+2800 | BRAILLE PATTERN BLANK | So | A Braille symbol with no dots; renders blank in most fonts |
ASCII, alt codes and the "blank ASCII character"
Standard ASCII has 128 code points, and the space (decimal 32, hex 20) is its only printable blank character. Searches for an ASCII blank character usually mean either that ordinary space or something from an extended 8-bit code page, which is not ASCII. In the Windows-1252 and Latin-1 encodings, byte 160 (hex A0) is the no-break space. In the older OEM code page 437, byte 255 is a no-break space. That is why two different alt codes are often quoted for the same invisible result.
Zero width characters, directional marks, the Hangul filler and the Braille blank are outside these 8-bit code pages. They do not have a classic alt code and must be entered by Unicode code point.
Arabic-script invisible characters
"Arabic invisible character" usually refers to one of three things. The Arabic letter mark (U+061C) and the right-to-left mark (U+200F) are directional controls that affect how surrounding characters are ordered on screen. The zero width non-joiner (U+200C) is a legitimate spelling tool in Persian and some other languages that use Arabic script, where it separates letters that would otherwise connect. The tatweel or kashida (U+0640) is sometimes confused with these, but it is a visible stretching stroke, not an invisible character.
Directional marks change the order in which text is displayed, not the order in which it is stored. Two strings can look different on screen while containing the same letters in the same order, or look identical while containing different characters. This matters for editing, for search, and for source code. Hidden bidirectional controls in code can make a program appear to do something other than what the compiler sees, which is why many code editors and review tools now flag them.
How to identify an invisible character
Appearance cannot identify these characters reliably, because many of them look identical or show nothing at all. The dependable method is to read the code points directly. Useful clues include:
- The cursor needs an extra arrow-key press to move past a spot that looks empty, which suggests a zero width character.
- A line refuses to wrap between two words, which suggests a no-break space or word joiner.
- A search for a phrase fails even though the phrase looks correct, which suggests a hidden character or a no-break space in place of a normal space.
- A file or field starts with an invisible character that breaks parsing, which is often a byte order mark (U+FEFF).
- Text near Arabic or Hebrew words displays in an unexpected order, which suggests directional marks.
- A "blank" name shows as an empty box in some apps, which suggests a Hangul filler or similar character that the font does not render as blank.
To confirm, use a Unicode code point inspector, an editor that can show invisible or whitespace characters, or a hex view of the file. Search for terms such as "Unicode character inspector", "show invisible characters" or "code point viewer" for your editor or platform. Feature names and menu locations vary by application and version and are not verified here, so check your own software's documentation. If you can run Python, the snippet below prints each character's code point, category and official name:
import unicodedata
text = 'a\u200bb\u00a0c'
for ch in text:
print(f'U+{ord(ch):04X} {unicodedata.category(ch)} {unicodedata.name(ch, "<no name>")}')
For that sample input, the expected output identifies the hidden zero width space and the no-break space:
U+0061 Ll LATIN SMALL LETTER A
U+200B Cf ZERO WIDTH SPACE
U+0062 Ll LATIN SMALL LETTER B
U+00A0 Zs NO-BREAK SPACE
U+0063 Ll LATIN SMALL LETTER C
To find the characters from the table above in a larger text, a regular expression over those ranges works as a quick filter. It deliberately also matches the bidirectional embedding and isolate controls, which are the ones most often misused:
import re
suspicious = re.compile(
'[\u00a0\u00ad\u061c\u115f\u1160\u180e\u2000-\u200f'
'\u2028-\u202f\u205f-\u2069\u2800\u3000\u3164\ufeff]'
)
for m in suspicious.finditer(text):
print(m.start(), f'U+{ord(m.group()):04X}')
In a browser console, the same inspection can be done in JavaScript. Iterating with for...of walks code points rather than UTF-16 units, so characters outside the Basic Multilingual Plane are reported correctly:
for (const ch of text) {
console.log('U+' + ch.codePointAt(0).toString(16).toUpperCase().padStart(4, '0'));
}
Code point inspection shows individual characters, not what a reader sees as a single unit. A zero width joiner inside an emoji sequence is intentional and is part of the emoji. Removing it splits the emoji into separate pictures, so do not treat every U+200D as junk.
Ways to type a blank character
The methods below are widely documented, but availability depends on your operating system, keyboard layout, input settings and the application. They have not been tested for this article, so confirm them on your own setup.
- Windows alt codes: with Num Lock on, hold Alt and type 0160 on the numeric keypad for a no-break space in many applications. Alt plus 255 is the older code page 437 equivalent. Top-row number keys generally do not work for this.
- Microsoft Word: type the hexadecimal code point, such as 200B, then press Alt+X to convert it to the character.
- Linux: in many GTK and IBus environments, press Ctrl+Shift+U, type the hex code point, then press Space or Enter.
- macOS: after enabling the Unicode Hex Input input source, hold Option and type the hex code point.
- HTML: use character references such as for the no-break space, for the zero width space, and for the joiners, and and for the directional marks.
- Copying from a code point inspector or character map is often the most reliable route for characters you rarely use.
Will it survive copying, sharing and assistive technology?
Not reliably. Behavior depends on the destination, and no specific platform was tested for this article. Some general patterns are well established:
- Many forms, chat apps and social platforms trim leading and trailing whitespace. Some also normalize or strip zero width and directional characters, which can make a "blank" name or message empty again or cause it to be rejected.
- Copying from a web page may convert no-break spaces into ordinary spaces, or keep them, depending on the browser and the destination.
- Characters that look blank in one font can appear as an empty box or a question mark in another font or on another device. A blank rendering on your screen does not show how the text looks elsewhere.
- Search and matching treat invisible characters as real. A word with a zero width space inside it will usually not match the same word typed normally, and a no-break space may not match an ordinary space.
- In code, configuration files, CSV and JSON, invisible characters can cause syntax errors, failed lookups, or keys that look identical but do not match. A byte order mark at the start of a file is a common cause.
- Passwords and usernames that contain invisible characters may be impossible to retype. Some systems normalize them and some do not.
- Screen readers vary. An invisible character may be skipped, read as a pause, or announced by its name. This was not tested for specific screen readers here. If a name or label consists only of a blank character, someone using assistive technology may get no useful information at all.
Keep a plain-text equivalent whenever text must be searchable, editable, accessible, or machine-readable. In practice, use an ordinary space in normal writing and limit invisible characters to cases with a clear typographic or linguistic purpose. Examples are a no-break space between a number and its unit, a zero width non-joiner in Persian spelling, or a directional mark that fixes a punctuation display problem in mixed-direction text. When you receive text from an unknown source, inspect and clean it before you use it in code, data, or credentials.
Gaps in this guide
This guide covers documented Unicode properties and widely known input methods. It does not include tested results for specific apps, games, social networks, or screen readers, and it does not cover any tool's privacy or data retention practices. If a particular destination matters to you, run a scoped test there: paste the character, check how it displays, then copy it back out and inspect the code points to see whether it was kept, replaced or removed.