About the Unicode Character Lookup
Unicode Character Lookup inspects every character you paste and shows what it really is: its code point (U+20AC), decimal value, official Unicode name for common characters, general category, block, UTF-8 and UTF-16 encodings, HTML entities and the escape sequences used in JavaScript, CSS, Python and other languages.
Developers use it to debug mojibake and encoding errors, find out which invisible character is breaking a string (a zero-width space or a non-breaking space), and get the right escape for code or HTML. Writers and designers use it to identify look-alike symbols, dashes and quotes, and to see how an emoji is built from several code points.
Text is analysed by code point, so an emoji with a skin tone or a family emoji appears as several rows joined by modifiers and zero-width joiners. Names are built in for ASCII, Latin-1 and frequently used symbols and emoji; blocks and categories cover the whole Unicode range. Nothing is sent to a server.
How to use the unicode character lookup
- 1Paste a character, emoji or a whole string into the box.
- 2Read the code point, name, category and block of the first character.
- 3Copy the UTF-8 bytes, HTML entity or escape sequence you need.
- 4Scroll the table to inspect every character, including invisible ones.
Formula and method
Every character has a code point, a number written as U+ followed by at least four hexadecimal digits (β¬ is U+20AC = 8364). UTF-8 stores code points below 128 in one byte, identical to ASCII, and larger ones in two to four bytes: the first byte starts with 110, 1110 or 11110 to give the length and the following bytes start with 10, each carrying 6 bits of the code point. β¬ (0010 0000 1010 1100) becomes 1110 0010, 10 000010, 10 101100 = E2 82 AC.
UTF-16 uses one 16-bit unit for code points up to U+FFFF and a surrogate pair (D800βDBFF then DC00βDFFF) above that, which is why π (U+1F600) has a JavaScript length of 2. The HTML numeric references &#decimal; and &#xhex; work for every character; named entities such as € exist only for some. Category and block come from the Unicode Character Database.
Worked examples
Euro sign
The euro sign is U+20AC (8364 in decimal). It lies above U+07FF, so UTF-8 needs three bytes, E2 82 AC, and in HTML it can be written €, € or €.
An emoji outside the Basic Multilingual Plane
U+1F600 is above U+FFFF, so it takes four UTF-8 bytes (F0 9F 98 80) and a UTF-16 surrogate pair D83D DE00, which is why JavaScript reports its length as 2.
Find a hidden character in a word
The string has five code points: c, a, f, Γ© (U+00E9, 2 bytes in UTF-8) and a trailing non-breaking space U+00A0 (also 2 bytes), for 7 bytes in total. The NBSP is the kind of invisible character that breaks string comparisons.
Frequently asked questions
What is a Unicode code point?+
A unique number assigned to each character in the Unicode standard, written U+ followed by hexadecimal digits, from U+0000 to U+10FFFF. For example A is U+0041, Γ© is U+00E9 and π is U+1F600.
How many bytes does a character take in UTF-8?+
One byte for ASCII (U+0000βU+007F), two for U+0080βU+07FF (most accented Latin, Greek, Cyrillic, Hebrew, Arabic), three for U+0800βU+FFFF (most Chinese, Japanese, Korean and symbols such as β¬) and four for emoji and other characters above U+FFFF.
Why does an emoji count as two characters in JavaScript?+
JavaScript strings use UTF-16, and characters above U+FFFF are stored as a surrogate pair of two 16-bit units, so "π".length is 2. Emoji with skin tones or joined families are several code points and can be longer still.
How do I type a Unicode character in HTML?+
Use a numeric character reference: € (decimal) or € (hex) for β¬. Some characters also have named entities such as €, © and . With a UTF-8 page you can usually paste the character directly.
How do I find invisible characters in text?+
Paste the text here and look at the table: non-breaking spaces (U+00A0), zero-width spaces (U+200B), joiners (U+200D), soft hyphens (U+00AD) and byte-order marks (U+FEFF) show up as separate rows even though you cannot see them.