What Are Zero-Width Characters? How to Find and Remove Them
4 min read
Zero-width characters are invisible Unicode characters that take up no visible space but can cause serious issues in code, data processing, and text comparison.
Common Zero-Width Characters
| Name | Unicode | Purpose |
|---|---|---|
| Zero-Width Space (ZWSP) | U+200B | Optional line-break point |
| Zero-Width Non-Joiner | U+200C | Prevents ligatures |
| Zero-Width Joiner | U+200D | Creates ligatures/emoji combos |
| Soft Hyphen | U+00AD | Optional hyphenation point |
| BOM (Byte Order Mark) | U+FEFF | Indicates encoding |
Problems They Cause
- String comparison fails:
"hello" !== "h\u200Bello" - JSON parsing errors
- Database unique constraint violations
- Search/filter mismatches
Remove Them
Use our plain text converter with "Remove zero-width characters" enabled.