Text Sanitizer.
Detect and remove invisible characters, zero-width spaces, BOM, control characters, and RTL marks. Protect your data and applications.
- Security & Privacy
- Runs in your browser
Text Sanitizer
Example Texts
Character Types
Zero-Width
ZWSP, ZWNJ, ZWJ - Invisible characters that affect layout
Control Characters
NULL, SOH, STX - Non-printable ASCII control codes
BOM
Byte Order Mark - Can cause encoding issues
RTL Marks
Right-to-left override marks for bidirectional text
Special Spaces
Non-breaking spaces, em spaces, thin spaces
Security Notes
Phishing Risk
Invisible characters can hide malicious URLs or create fake domains
Data Corruption
Control characters can break databases and file formats
Copy-Paste Issues
Invisible chars cause unexpected behavior when copying text
Use cases
Real-world uses.
- Security Auditing
- Scan user input for invisible characters used in phishing attacks, fake URLs, and security exploits. Protect your application from hidden threats.
- Database Cleaning
- Sanitize text before database insertion to prevent corruption, encoding issues, and query problems. Ensure data integrity.
- Code Cleanup
- Remove invisible characters from code copied from PDFs, Word docs, or websites. Prevent syntax errors and compilation issues.
- Content Management
- Clean content from multiple sources before publishing. Remove hidden characters that cause formatting inconsistencies.
- Search Optimization
- Remove invisible characters that interfere with search indexing and matching. Improve search accuracy and relevance.
- Malware Detection
- Identify suspicious invisible characters that may indicate malicious content or attempted exploits.
- Web Scraping
- Clean scraped content by removing invisible characters and normalizing whitespace. Get clean, usable data.
- Debugging
- Troubleshoot mysterious text issues by revealing hidden characters. Find the source of copy-paste problems.
How it works
Four steps.
- 01
Paste or upload text that may contain invisible or malicious characters.
- 02
Enable sanitization options: zero-width chars, control chars, BOM, RTL marks, etc.
- 03
Toggle 'Show Invisible' to see hidden characters marked with labels like [ZWSP], [BOM].
- 04
Copy cleaned text or download it as a file for safe use in your application.
Features
Key Features of Text Sanitizer.
Security Protection
Remove invisible characters used in phishing, malware, and security attacks.
Invisible Character Detection
Detect and visualize zero-width spaces, control chars, BOM, and RTL marks.
Real-Time Scanning
Instant detection and removal with live statistics and issue alerts.
Granular Control
Choose exactly which character types to remove with 6 independent options.
Issue Alerts
Visual warnings show detected issues with detailed descriptions of problems found.
Batch Processing
Upload and sanitize entire files at once. Download cleaned versions instantly.
Database Safe
Clean text before database insertion to prevent corruption and encoding issues.
Whitespace Normalization
Optional: normalize multiple spaces, tabs, and newlines to clean format.
What are invisible characters?
Invisible characters are Unicode characters that don't display visually but exist in text. Examples: Zero-Width Space (ZWSP), Byte Order Mark (BOM), control characters, RTL marks. They can cause copy-paste issues, break code, or be used maliciously.
Why are invisible characters dangerous?
Invisible characters can: 1) Hide malicious URLs in phishing attacks, 2) Create fake domain names that look identical, 3) Break code and databases, 4) Cause unexpected behavior in applications, 5) Be used to bypass content filters.
What is a Zero-Width Space (ZWSP)?
ZWSP (U+200B) is an invisible character that allows line breaks. It's useful in typography but can be abused to hide text, manipulate word counts, or create fake duplicates. Often found in copy-pasted content.
What is BOM and should I remove it?
BOM (Byte Order Mark, U+FEFF) indicates text encoding. It's useful for UTF-16/32 but problematic in UTF-8. It can break JSON parsing, cause '' to appear, and create encoding issues. Usually safe to remove.
What are RTL marks?
RTL (Right-to-Left) marks control text direction for languages like Arabic and Hebrew. They can be abused to reverse text display, hide content, or create fake URLs. Only remove if you don't need bidirectional text support.
Will this remove all special characters?
No! It only removes invisible/control characters. Visible special characters like @, #, $, emojis, and accented letters (é, ñ) are preserved. You control exactly what gets removed.
How do I see what invisible characters are in my text?
Click the 'Show Invisible' button. Invisible characters will be replaced with labels like [ZWSP], [BOM], [RTL], etc. This helps you understand what's hidden in your text.
Should I normalize whitespace?
Enable 'Normalize Whitespace' if you want to: clean up multiple spaces, remove extra blank lines, trim leading/trailing whitespace. Useful for cleaning up messy copy-pasted content.
Can this help with copy-paste issues?
Yes! Many copy-paste problems are caused by invisible characters. Sanitize text after copying from PDFs, Word documents, or websites to remove hidden characters that cause formatting issues.
Is this tool safe for sensitive data?
Yes! All processing happens locally in your browser. No text is sent to any server. Your data remains completely private and secure.
Related tools
More Security & Privacy tools.
AES Cipher
Encrypt and decrypt using AES
Bcrypt Hash Generator
Generate secure BCrypt password hashes
Blowfish Cipher
Fast symmetric block cipher encryption with variable-length keys (32-448 bits)
Clickjacking Tester
Test websites for clickjacking vulnerabilities
CSP Generator
Generate Content Security Policy headers
CSRF Token Generator
Generate secure CSRF protection tokens
DES Cipher
DES and Triple DES encryption/decryption for legacy system compatibility
Hash Calculator
Calculate MD5 SHA hashes quickly
Built by Infyways
Need more than a tool.
These utilities are made by the Infyways studio. When a free tool is not enough, we build the real thing.