textscrubr
Home / Blog / Hidden characters

How to Remove Invisible Characters From Text

Hidden characters2 min readUpdated 2026-06-23
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 or normalizes each one (for example, turning a non-breaking space into a normal space).
  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.

Scrub this text in one click

textscrubr strips the hidden characters, em dashes, and double spaces, and keeps your lists, headings, and code exactly where you put them. Free, and it runs entirely in your browser.

Clean my text free →

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.