Skip to content

Remove invisible characters

Remove selected hidden characters from text, with explicit options for joiners, direction marks, and nonbreaking spaces.

May change emoji sequences and the spelling or shaping of some languages.
May change how right-to-left text is displayed.
Processed on your device

How it works & useful details

How to use this tool

By default, remove soft hyphen U+00AD, zero-width space U+200B, word joiner U+2060, and BOM/zero-width no-break space U+FEFF. These can be intentional, so review the output before using it.

How the result is calculated

Optional joiner removal targets U+200C and U+200D. Direction-control removal targets U+061C, U+200E–U+200F, U+202A–U+202E, and U+2066–U+2069. Space replacement changes U+00A0 and U+202F to ordinary U+0020 spaces.

Other characters, including ordinary whitespace, combining accents, variation selectors, and line endings, are preserved. This is a selected-character cleaner, not a complete Unicode sanitizer.

Up to 500,000 UTF-16 code units per input. Text stays on your device.

About this tool

Remove invisible characters strips hidden code points such as zero-width spaces, joiners, direction marks, nonbreaking spaces, and byte-order marks. These characters often arrive by copy-paste and cause text to fail validation or comparisons.

Each category of hidden character is controlled separately, so you remove exactly what is causing trouble rather than damaging meaningful content. The cleanup runs locally.

How to use it

  1. Paste the text that contains hidden characters.
  2. Select the categories you want to remove.
  3. Review the result and the reported removals.
  4. Copy or download the cleaned text.

Worked example

The text "price list and café" can look normal but contain a zero-width space after "price", a soft hyphen after "list", and a byte-order mark inside "café". Search and exact matching then fail without any visible reason. Cleaning it removes three hidden characters and reports the count, so you know something was actually there.

What each option targets

  • Default: soft hyphen (U+00AD), zero-width space (U+200B), word joiner (U+2060), and the byte-order mark or zero-width no-break space (U+FEFF). These most often break lookups, deduplication, and CSV headers.
  • Joiners (U+200C, U+200D): zero-width non-joiner and joiner. They are needed in emoji sequences like 👨‍👩‍👧 and in scripts such as Persian and Hindi, so only remove them from data like IDs or codes.
  • Direction controls: invisible marks that change text direction. They are legitimate in Arabic and Hebrew text, but have also been used to disguise code (the "Trojan Source" attack).
  • Space replacement: converts non-breaking spaces (U+00A0, U+202F) into ordinary spaces, which fixes numbers and names copied from word processors.

Frequently asked questions

Why do my strings not match even though they look identical?

Invisible characters such as zero-width spaces or direction marks differ in code points while looking the same. Removing them usually resolves the mismatch.

Should I always remove nonbreaking spaces?

Only when they cause problems. In typography they are intentional, so the option is separate.

What is the limit?

Up to 500,000 characters of text.

Why does my spreadsheet header not match even after trimming?

CSV files saved as "UTF-8 with BOM" start with U+FEFF, which gets glued to the first column name. Removing invisible characters strips it.