Invisible character detector
Everything runs in your browser; nothing is sent or stored.
- Paste the text into the "Test text" field. The result updates as you type.
- The "Summary by type" section shows the number of characters of each type, the name and code of each character, and the line ending counts.
- In the "Character positions in the text" section, each character is marked by name within the text, and the list shows its position in line:column format, counted from 1. Each character counts once, including a character stored as two UTF-16 units. The list shows up to 2,000 characters.
- Hebrew punctuation is marked for information only: the maqaf (U+05BE), geresh (U+05F3), and gershayim (U+05F4) are correct in Hebrew text, but they are different characters from the ASCII hyphen, apostrophe, and quotation mark, so a search or comparison by the ASCII character will not find them.
- In the "Text cleaning" section, check the cleaning options you need and click "Clean".
- Copy the cleaned text by clicking "Copy".
- Hidden characters usually arrive when copying from documents, web pages, or messaging apps. They can break code and configuration files, make string comparisons fail, break URLs and passwords copied from a document, and make punctuation and numbers appear in the wrong place in right-to-left text, such as Arabic or Hebrew.
What are invisible characters
Invisible characters are Unicode characters that are not displayed on screen, or that look like an ordinary space. Bidi control characters, such as RLM and LRM, set the direction of punctuation and numbers in text that mixes a right-to-left script, such as Arabic or Hebrew, with English. Zero-width characters, such as ZWSP and BOM, take up no space in the line at all. The non-breaking space (NBSP) looks like an ordinary space, but it prevents a line break and counts as a different character from an ordinary space in searches and comparisons. The soft hyphen (SHY) is shown only when a word is broken at the end of a line.
Common problems caused by invisible characters
An invisible character copied together with a value makes the value fail even though it looks correct: a username or password that is not recognized, a DNS record that does not work, or a URL that leads to an error page. A BOM at the start of a JSON file can cause a parse error, and a non-breaking space in a configuration file or in code can cause a syntax error. In right-to-left text, unnecessary bidi control characters make punctuation and numbers appear in the wrong place.
Trojan Source and bidi control characters in source code
The bidi control characters RLO and LRO, the embedding characters, and the isolate characters change the display order of the characters in a line. In source code, bidi control characters can be exploited so that the code shown in the editor differs from the code that actually runs: a section that looks like a comment may run, and a section that looks like a command may be part of a comment. This attack is called Trojan Source. When the text includes characters that change the display order, a warning appears in the "Summary by type" section. You can remove bidi control characters from source code, but in right-to-left text mixed with English, RLM and LRM are sometimes used to fix the display, and removing them may change where punctuation appears.
Common invisible characters
U+200FRLM, right-to-left mark. Common in Arabic or Hebrew text copied from messaging apps and websites.U+200ELRM, left-to-right mark. Used to fix the display of numbers and English words within right-to-left text.U+202ERLO, right-to-left override, which reverses the display direction. Used in the Trojan Source attack and to hide the real extension of a file name.U+200BZWSP, zero-width space. Allows a line break without a visible space, and is common in text copied from web pages.U+FEFFBOM, byte order mark. Appears at the start of files saved in UTF-8 with BOM encoding.U+00A0NBSP, non-breaking space. Created in HTML by the entity and by word processors.U+00ADSHY, soft hyphen. Created by word processors as an optional hyphen, and stays in copied text even when the word is not broken.
Invisible character detector FAQ
Does the detector also mark tabs, line breaks, and ordinary spaces?
No. Tabs, line breaks, and ordinary spaces are not marked, and cleaning does not change them. Line endings are counted separately in the "Summary by type" section, by type: CRLF, LF, and CR. When the text includes more than one type, a message says so.
Why is Hebrew punctuation marked, and is it an error?
Hebrew punctuation is not an error. The maqaf (the Hebrew hyphen), the geresh, and the gershayim are correct in Hebrew text, and they are marked for information only. However, they are different characters from the ASCII hyphen, apostrophe, and quotation mark, so a search for a Hebrew abbreviation typed with an ordinary quotation mark will not find it when it was written with gershayim. The "Convert Hebrew punctuation to ASCII" option is not checked by default, and you can check it when needed.
Can cleaning affect emoji?
Cleaning can change how complex emoji are displayed. The ZWJ character joins several emoji into one, for example in a family emoji, and tag characters are used in the flags of regions, such as the flag of Scotland. The "Remove zero-width characters" and "Remove tag characters" options are checked by default, so for text with emoji, you can uncheck them.
Why is the column number different from the position in my code editor?
The column number is counted from 1, and each character counts as one column, including a character stored as two UTF-16 units, such as most emoji. Some code editors count UTF-16 units or count a tab as several columns, so the position in the editor may differ.
Can I check a long text?
Yes. The detector accepts text of up to 1,000,000 characters. The view and the list of positions mark up to the first 2,000 characters, and the total number appears in the message below the text field. The summary by type and the cleaning include all the invisible characters in the text.