Find & Remove Hidden Zero-Width Characters Detect and remove hidden zero-width and invisible characters in text.
Zero-Width Character Detector
Detect and remove hidden zero-width and invisible characters in text.
Paste Text
Paste text that may contain hidden invisible characters.
View Detection Results
See a list of all invisible characters found with their positions and types.
Get Cleaned Text
Copy the cleaned text with all invisible characters removed.
What Is Zero-Width Character Detector?
A zero-width character detector is a tool that scans text for hidden invisible Unicode characters that can't be seen but affect text processing, including Zero-Width Space (U+200B), Zero-Width Non-Joiner (U+200C), and Word Joiner (U+2060). Developers and security researchers use it to identify potential issues in their code or data, such as bugs caused by invisible characters that break string comparisons. One specific problem it solves is detecting hidden characters used in homograph attacks, where an attacker uses invisible Unicode characters to manipulate text and deceive users.
The tool is particularly useful for finding zero-width space in text and detecting invisible Unicode characters like the Soft Hyphen (U+00AD) and BOM (U+FEFF). What makes it different is its ability to not only detect these characters but also remove them from the text, providing a cleaned version of the input. It achieves this by iterating over each character in the input string, checking if it matches any of the known zero-width characters defined in the ZERO_WIDTH_CHARS record, and if so, adding it to a list of found characters.
It uses a callback function onProcess to handle the detection and cleaning process, which returns a detailed report including the position and Unicode code point of each detected character, making it an effective invisible character finder. The report also includes the cleaned text with all hidden characters removed, allowing users to easily identify and fix issues caused by these characters.
Why Use Zero-Width Character Detector?
-
Detects 15+ types of invisible Unicode characters
-
Shows exact position and type of each hidden character
-
Provides cleaned text with invisible characters removed
-
Essential for debugging string comparison issues
-
Identifies potential text manipulation or watermarking
Common Use Cases
Code Debugging
Find invisible characters causing compilation errors, failed comparisons, or unexpected behavior.
Data Cleaning
Clean database entries, CSV files, and imported data by removing embedded invisible characters.
Security Analysis
Spot hidden Unicode used in phishing, homograph attacks, or text manipulation.
Copy-Paste Cleanup
Catch stray formatting characters that slip in when copying text from websites or documents.
Technical Guide
The detector scans each character's Unicode code point against a known list of invisible/zero-width characters. It checks for Zero-Width Space (U+200B), Zero-Width Non-Joiner (U+200C), Zero-Width Joiner (U+200D), Left/Right-to-Right Marks (U+200E/200F), Word Joiner (U+2060), Invisible Math Operators (U+2061-2064), BOM (U+FEFF), Soft Hyphen (U+00AD), Combining Grapheme Joiner (U+034F), Arabic Letter Mark (U+061C), and Mongolian Vowel Separator (U+180E). Each detected character is logged with its position, Unicode code point, and human-readable name. The cleaned output is generated by filtering out all detected invisible characters.
Tips & Best Practices
-
1Always check pasted code for invisible characters if you get unexpected errors
-
2Zero-width characters in passwords can make them appear to match when they don't
-
3Text copied from websites often contains hidden formatting characters
-
4JSON and CSV data can be corrupted by invisible characters in field values
-
5Use this tool as a first step when debugging "works on my machine" string issues
Related Tools
Character Counter
Count characters with and without spaces, plus word, line, and paragraph counts.
📝 Text Tools
Find and Replace
Find and replace text with support for regex, case sensitivity, and bulk operations.
📝 Text Tools
Remove Extra Spaces
Remove extra whitespace — collapse multiple spaces to single spaces.
📝 Text Tools
Invisible Text Generator
Generate invisible Unicode characters — zero-width spaces, joiners, and more.
📝 Text Tools
Homoglyph Detector
Detect look-alike characters (homoglyphs) from different Unicode scripts.
📝 Text ToolsFrequently Asked Questions
Q Why can't I see zero-width characters?
Q How do invisible characters get into my text?
Q Can invisible characters cause bugs?
Q Are invisible characters malicious?
Q What's the most common invisible character?
About This Tool
Zero-Width Character Detector is a free online tool by FreeToolkit.ai. All processing happens directly in your browser — your data never leaves your device. No registration or installation required.