How zero-width removal works
The pass is a single regex: /[-]/g. Each match is replaced with an empty string. The set covers the most common zero-width characters: ZWSP (U+200B, used for invisible word breaks), ZWNJ (U+200C, prevents ligatures in scripts like Persian), ZWJ (U+200D, joins emoji components and Indic letters), the BOM (U+FEFF, often left at the start of files), and the word joiner (U+2060, prevents line breaking).
These characters are zero-width in display but full-width in storage: a string with a hidden ZWSP is one character longer than it looks, and string equality fails between the visible-identical version and the version with the hidden character. They often appear in text copied from word processors, AI-generated copy, or pasted from rich-text editors that use them for layout tricks or invisible watermarking.
After the pass, the visible text is unchanged but the underlying string is exactly what it appears to be. Pair with remove control chars for ASCII control bytes, or with remove non-ASCII if you want to flatten to plain 7-bit text. Output is computed in your browser on every keystroke, no upload.
How to use remove zero-width characters from text
- 1Paste copy-pasted text from a webpage, document, or AI chat into the input.
- 2Read the cleaned result on the right with invisible characters stripped.
- 3Compare lengths in the input vs output to confirm hidden characters were removed.
- 4Click Copy to take the cleaned text.
- 5Run remove control chars after if ASCII control bytes also lurk.
Keyboard shortcuts
Drive TextResult without touching the mouse.
| Shortcut | Action |
|---|---|
| Ctrl F | Open the find & replace panel inside the input Plus |
| Ctrl Z | Undo the last input change |
| Ctrl Shift Z | Redo |
| Ctrl Shift Enter | Toggle fullscreen focus on the editor Plus |
| Esc | Close find & replace, or exit fullscreen |
| Ctrl K | Open the command palette to jump to any tool Plus |
| Ctrl S | Save current workflow draft Plus |
| Ctrl P | Run a saved workflow Plus |
What this tool actually does
Strips the standard zero-width set
Targets U+200B (ZWSP), U+200C (ZWNJ), U+200D (ZWJ), U+FEFF (BOM), and U+2060 (word joiner). These are the codepoints commonly used for invisible breaks, ligature control, emoji joining, and document markers.
Visible text completely unchanged
Letters, digits, punctuation, whitespace, and emoji visible in your input pass through with no modification. Only the invisible characters in the targeted set are dropped, so the on-screen text is identical before and after.
Removes BOM at the start of files
The byte order mark (U+FEFF) often appears as the first character of UTF-8 files exported from Windows tools. JSON parsers and shell scripts choke on it. This pass strips every occurrence, including a BOM at the very beginning.
Affects emoji that rely on ZWJ
Compound emoji like family sequences are built using zero-width joiners. Stripping them splits the emoji into its component parts. To strip emoji wholesale instead, use remove emoji, which targets the full pictograph ranges directly.
Single regex pass, no upload
The transform is one String.replace call evaluated in your browser on every keystroke. Linear time on huge inputs. Nothing about the text leaves the page, no log is kept on our servers, and the output panel updates without a network round trip.
Worked example
The hidden ZWSP between Hello and world disappears, and the BOM between name and value is stripped. Visible characters are untouched.
Helloworld namevalue
Helloworld namevalue
Settings reference
| Behaviour | Effect on output |
|---|---|
| Zero-width space (U+200B) | Stripped. Often used for invisible word breaks in HTML. |
| Zero-width non-joiner (U+200C) | Stripped. Used in Persian and Arabic to prevent ligatures. |
| Zero-width joiner (U+200D) | Stripped. Used to combine emoji components and Indic letters. |
| Byte order mark (U+FEFF) | Stripped. Common stray character at the start of UTF-8 files. |
| Word joiner (U+2060) | Stripped. Prevents line breaks between adjacent characters. |
| Visible characters and emoji bodies | Pass through unchanged. Only the targeted invisible codepoints are removed. |
| Other invisible Unicode | Pass through. This pass targets only the listed five codepoints. |