textscrubr
Home / Blog / Hidden characters

How to Remove Invisible Characters From Text

Hidden characters2 min readUpdated 2026-10-25
To remove invisible characters from text, paste it into a cleaner that targets zero-width spaces, the byte-order mark, non-breaking spaces, soft hyphens, and direction marks. You cannot see them by eye, so manual deletion is unreliable. A cleaner finds every one and strips it in a single pass.

Invisible characters are real characters that take up no visible space. They hide inside text you paste from chatbots, web pages, and word processors, and they cause problems you cannot diagnose by looking. Here is how to get rid of them.

What counts as an invisible character

The common culprits:

Why they cause trouble

You cannot see them, but software can:

How to remove them

Manual deletion does not work, because you cannot place your cursor on a character you cannot see. You need a tool that targets them by their Unicode code point. A cleaner like textscrubr:

  1. Scans the text for every known invisible character.
  2. Removes the ones with no job in the text, normalizes unusual spaces, and keeps the ones that carry meaning, such as joiners in Persian or Hindi words, telling you which is which.
  3. Leaves your visible text and structure untouched.
  4. Shows you a count of exactly what it pulled out, so you can see the otherwise invisible.

It even keeps the zero-width joiners that real emoji rely on, so removing the noise does not break your ๐Ÿ‘๐Ÿฝ.

How to check whether text has them

Paste it into a cleaner and look at the report. If it lists zero-width spaces, a BOM, or non-breaking spaces, your text was carrying hidden passengers. Running everything you paste from an AI tool through a cleaner makes this a non-issue.

See what is hidden in your text

textscrubr shows every invisible character, removes the ones with no job, and keeps your lists, headings, links and code intact. Em dash cleanup is one optional toggle. Free, and it runs entirely in your browser.

Inspect and clean my text free โ†’

Work inside Claude or ChatGPT? The same engine is available there for a one-time $29.

Frequently asked questions

How do I know if my text has invisible characters?

You cannot see them, so paste the text into a cleaner that reports what it finds. If it lists zero-width spaces, a byte-order mark, or non-breaking spaces, they were present.

Why do invisible characters break code?

A zero-width character inside a variable name, string, or key changes the bytes without changing what you see, so the code no longer matches what you intended and errors out.

Can I just delete invisible characters by hand?

Not reliably, because you cannot place your cursor on a character you cannot see. A tool that targets them by Unicode code point is the dependable way to remove every one.