Special Character Detector

Paste text to detect, highlight, and count hidden, zero-width, control, and special Unicode characters. Clean them with one click.

Input Text

Instant Detection

Highlights and lists special characters as you type.

Privacy First

All analysis happens locally in your browser.

Clean Text

Remove all special characters with one click.

Frequently Asked Questions

What counts as a special character?

Any character outside standard printable ASCII, including zero-width spaces, control characters, and unusual Unicode symbols.

Can I remove all special characters?

Yes, the Clean Text button removes everything except standard printable ASCII, tabs, and line breaks.

Is my text sent to a server?

No, detection and cleaning are performed entirely client-side.

Common Hidden Characters Reference

These are the most problematic invisible Unicode characters found in real-world text. All are detected and labelled by this tool.

Character nameCode pointCommon problem it causes
Zero-Width SpaceU+200BBreaks string matching, invisible in all editors
Zero-Width Non-JoinerU+200CFound in Arabic/Persian copy-paste, breaks comparisons
Zero-Width JoinerU+200DUsed in emoji sequences, unexpected in plain text
Byte Order Mark (BOM)U+FEFFCorrupts first character of strings from Windows files
Soft HyphenU+00ADInvisible hyphen from PDFs/Word; breaks string length
Non-Breaking SpaceU+00A0Looks like a space but is not — fails \s regex matches
Right-to-Left MarkU+200FReverses text direction, used in filename spoofing
Word JoinerU+2060Prevents line breaks, invisible, from rich text editors

When Hidden Characters Cause Real Problems

Debug Copy-Paste Issues

Text that looks identical fails comparison. Zero-width characters inserted during copy-paste from websites or PDFs are the #1 cause.

Database WHERE Clause Failures

SQL queries that should match a string but return no results — almost always a hidden character in the pasted value.

Code & Variable Name Bugs

Two variables that appear identical but behave differently — a zero-width character in one identifier makes them distinct to the compiler.

Password Authentication Errors

Passwords copied from a password manager or document may include invisible characters, making them fail even when they look correct.

API Request Failures

API keys, tokens, or JSON values pasted from emails or PDFs often carry hidden characters that cause 401 or parsing errors.

Filename Security Audits

Detect right-to-left override characters in filenames that can disguise a malicious file extension as a safe one.

How to Remove Hidden Characters

  • VS Code regex replace: Open Find & Replace (Ctrl+H), enable regex mode, search for [\u200B-\u200D\uFEFF\u00AD] and replace with nothing.
  • JavaScript: str.replace(/[\u200B-\u200D\uFEFF]/g, '') removes the most common zero-width characters.
  • Python: import unicodedata; unicodedata.normalize('NFKC', text) normalises many special Unicode characters to their standard equivalents.
  • Paste via plain text: Use Ctrl+Shift+V (paste without formatting) in most apps to strip rich-text invisible characters at the source.

Frequently Asked Questions

What are zero-width characters and why are they dangerous?

Zero-width characters are Unicode code points that take up no visible space: zero-width space (U+200B), zero-width non-joiner (U+200C), zero-width joiner (U+200D), and others. They are invisible to the human eye but present in the string. In code, they break string comparisons. In databases, they cause WHERE clause mismatches. In passwords, they make credentials appear identical but fail authentication.

Where do hidden characters come from?

The most common source is copy-pasting from websites, PDFs, Word documents, or messaging apps. Rich text editors insert invisible formatting characters. Some websites deliberately embed tracking characters. AI-generated text sometimes includes soft hyphens or non-breaking spaces.

What is a BOM (Byte Order Mark)?

The BOM is the character U+FEFF placed at the start of a file to indicate its encoding. Some Windows programs prepend this to UTF-8 files. When pasted into code or databases, it appears as a corrupt first character and is nearly impossible to spot visually.

Can hidden characters break my code?

Yes. A variable name with a zero-width space looks identical to one without but is treated as a different identifier. SQL queries with invisible characters in string literals fail to match database values. JSON keys with hidden characters cause parse errors or silent data loss.

How do I remove special characters after detecting them?

Once you identify which characters are present using this tool, use a text editor with regex support (VS Code, Notepad++) to find and remove them. The regex [​-‍] targets common zero-width characters.

What is a right-to-left mark (RLM)?

U+200F is an invisible character that changes text direction to right-to-left. When embedded in filenames or URLs, it can be used to disguise malicious file extensions (e.g. making a .exe look like .jpg). Always check downloaded filenames for RTL/LTR marks.

Is this tool free?

Completely free. Paste any amount of text and get an instant character-by-character analysis with no limits.

What users say about Special Character Detector

Real feedback from ToolsBear users — reviewed and approved by our team.

Share your experience

Your feedback is reviewed by our team before it appears on this page.

0/2000