Check text for invisible characters
Learn how to inspect text for invisible Unicode characters, identify meaningful spacing and controls, and remove only what your intended use requires.
To check text for invisible characters, use a character inspector that exposes Unicode code points and character names. Inspect the affected passage before deleting anything: a character that looks like an unwanted blank may control spacing, word joining or text direction.
What an invisible-character check should reveal
An inspector helps you examine the characters stored in a string. This differs from CSS styling, which changes presentation without necessarily changing the underlying text. Unicode character substitution changes the stored characters; invisible characters and direction controls can affect spacing or display without adding an obvious visible symbol.
- Ordinary whitespace: spaces, tabs and line breaks can explain unexpected gaps or formatting.
- U+00A0 NO-BREAK SPACE: can resemble an ordinary space but prevents a line break at that position.
- U+200B ZERO WIDTH SPACE: provides a potential line-break opportunity without a visible space.
- U+200C ZERO WIDTH NON-JOINER and U+200D ZERO WIDTH JOINER: can affect script shaping; the joiner also participates in some emoji sequences.
- U+FEFF: can serve as a byte-order mark at the beginning of encoded text and may also appear within text.
- Bidirectional controls: characters such as U+202E RIGHT-TO-LEFT OVERRIDE can influence display order.
These are examples, not a complete detection list. A check limited to zero-width spaces will miss other spacing characters and controls. A useful inspection view distinguishes ordinary spaces from other characters and shows where each occurs.
Inspect first, then make a targeted change
- 1. Keep an unchanged copy so you can compare the result and undo edits.
- 2. Isolate the smallest passage that reproduces the problem, including the surrounding characters.
- 3. Examine its code points and character names. An editor’s whitespace view can help with tabs and line breaks, but verify which other characters it exposes.
- 4. Decide whether each unexpected character has a purpose in the language, formatting or emoji sequence.
- 5. Remove or replace only the characters responsible for the problem.
- 6. Paste the edited text into its intended destination and repeat the action that previously failed.
Choose replacement according to the intended meaning. Replacing an unwanted no-break space with an ordinary space preserves word separation. Deleting a separator entirely can join words. Removing a joiner or direction control can change how text is displayed.
Check readability and copy/paste compatibility
Do not use appearance alone to judge the result. Copy the edited passage into the actual field, document or application where it will be used, then inspect the pasted characters again. No destination-specific test results were supplied, so preservation, rendering and acceptance in a particular application remain unverified.
Assistive-technology behavior also needs a scoped check with the intended application and screen reader; no such results were supplied. Preserve meaningful language characters and use ordinary spaces and straightforward formatting where special controls are unnecessary. Converting content to plain text alone is not proof that invisible Unicode characters have been removed.
Handle sensitive text carefully
Before entering private text into an external checker, verify whether it sends text to a server and whether it stores submissions. No checker-specific processing documentation was supplied, so local-only processing or confidentiality cannot be assumed. For sensitive material, use an approved local inspection method or a non-sensitive sample that reproduces the issue.