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

NameUnicodePurpose
Zero-Width Space (ZWSP)U+200BOptional line-break point
Zero-Width Non-JoinerU+200CPrevents ligatures
Zero-Width JoinerU+200DCreates ligatures/emoji combos
Soft HyphenU+00ADOptional hyphenation point
BOM (Byte Order Mark)U+FEFFIndicates 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.