Unicode Lab

Search all of Unicode — every named character and emoji — by name, keyword or code point (U+2014, 0x2014, 8212) and copy it as an HTML entity or a JavaScript, CSS, JSON, PHP, Python or SQL escape. Paste text to reveal invisible characters, non-breaking spaces, bidi marks, lookalike letters, mixed-script spoofing and mojibake. Compare two strings that look identical, or check a domain for lookalike-letter spoofing. Every selected character is worked into its UTF-8 and UTF-16 bytes step by step.

Analyzer Text & Encoding Updated Oct 3, 2026
How to Use
  1. Search & copy: type a name or keyword (arrow, lambda, euro, family), a code point (U+2014, 0x2014, 8212), or paste a character. Click the glyph to copy it, or a format button for its escape.
  2. Inspect text: paste text to flag invisible, control, bidi, space, lookalike and mojibake characters, with every code point named. Emoji built from several parts are shown as one character with their parts underneath. Clean the text in one click.
  3. Compare: paste two strings that look the same to see whether they really are, and which characters differ.
  4. Domain check: paste a domain, link or email address to see what the browser really connects to (its xn-- form) and whether any letters are impostors.
  5. Click a character card or a table row to select it. The readouts show its code point, UTF-8 bytes, UTF-16 units and name, and Show Work below works out the bytes bit by bit.
Input
Search results
Code point
—
UTF-8 bytes
—
UTF-16 units
—
Name
—

Worked Example

é in UTF-8. é is U+00E9, which is 233 in decimal and 1110 1001 in binary. It is above U+007F and no higher than U+07FF, so UTF-8 needs 2 bytes with the pattern 110xxxxx 10xxxxxx, which holds 11 bits. Padded to 11 bits the number is 00011 101001; the first 5 bits go after 110 and the last 6 after 10, giving 11000011 10101001, or C3 A9. In UTF-16 it fits in one 16-bit unit, 00E9.

😀 in UTF-8 and UTF-16. The grinning face is U+1F600, beyond U+FFFF, so UTF-8 uses 4 bytes (11110xxx 10xxxxxx 10xxxxxx 10xxxxxx, 21 bits). Padded, 0x1F600 is 000 011111 011000 000000, which becomes 11110000 10011111 10011000 10000000 = F0 9F 98 80. UTF-16 needs a surrogate pair: 0x1F600 − 0x10000 = 0xF600; its top 10 bits are 0x3D and its bottom 10 bits 0x200, so the pair is 0xD800 + 0x3D = D83D and 0xDC00 + 0x200 = DE00.

The common mistake: treating string length as the number of characters. In JavaScript "😀".length is 2, because .length counts UTF-16 units. The family emoji 👨‍👩‍👧 is one visible character but 5 code points, 8 UTF-16 units and 18 UTF-8 bytes, so a 10-character limit checked with .length can cut an emoji in half and leave a broken surrogate. Count graphemes for what people see, and bytes for what a database column stores.

Show Work

Search for a character or click one to see its UTF-8 and UTF-16 bytes worked out.

Formulas and Reference

UTF-8, 1 byte (7 bits)
U+0000 – U+007F → 0xxxxxxx
UTF-8, 2 bytes (11 bits)
U+0080 – U+07FF → 110xxxxx 10xxxxxx
UTF-8, 3 bytes (16 bits)
U+0800 – U+FFFF → 1110xxxx 10xxxxxx 10xxxxxx
UTF-8, 4 bytes (21 bits)
U+10000 – U+10FFFF → 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
UTF-16 surrogate pair
u = cp − 0x10000; high = 0xD800 + (u ≫ 10); low = 0xDC00 + (u & 0x3FF)
Decoding a pair
cp = 0x10000 + (high − 0xD800) × 0x400 + (low − 0xDC00)
Zero-width space
U+200B · invisible, breaks matching
No-break space
U+00A0 · not a normal space
BOM
U+FEFF · hidden at file/string start
Zero-width joiner
U+200D · glues emoji together
Ohm sign vs omega
U+2126 normalizes to U+03A9
Mojibake
UTF-8 C3 A9 read as Windows-1252 → é

Character names, scripts, confusables and emoji sequences come from the Unicode Character Database, version 18 (© Unicode, Inc., used under the Unicode License).

From ASCII to UTF-8

ASCII, first published in 1963, gave computers 128 codes in 7 bits: enough for English and nothing else. The 1980s filled the eighth bit with dozens of incompatible code pages, which is where mojibake comes from: the same byte C3 is à in Windows-1252 and Г in Windows-1251. Unicode 1.0, published in October 1991, set out to give every character one number, and was designed as a 16-bit code with 65,536 places.

UTF-8 was designed by Ken Thompson and Rob Pike in September 1992, famously sketched on a placemat in a New Jersey diner, and presented at the USENIX conference in January 1993. Its trick is that ASCII stays exactly as it was, and every lead byte says how many continuation bytes follow. When 65,536 places proved too few, Unicode 2.0 (1996) added surrogate pairs, giving 17 planes and 1,114,112 code points; RFC 3629 (2003) then capped UTF-8 at 4 bytes so it covers the same range.

Lookalike letters became a security problem once domain names could hold them. Evgeniy Gabrilovich and Alex Gontmakher described the homograph attack in Communications of the ACM in 2002, and Punycode (RFC 3492, 2003) defined the xn-- form that browsers actually look up. In 2017 Xudong Zheng registered xn--80ak6aa92e.com, which displayed as “аррӏе.com”, and Chrome and Firefox changed how they show such names in the address bar.

About This Tool

Plain text is rarely as plain as it looks. Copy a sentence from a PDF, a chat app, a spreadsheet or a styled web page and you can pick up invisible passengers: zero-width spaces wedged between letters, a non-breaking space where you expected a normal one, a stray byte-order mark, soft hyphens, or bidirectional control marks that quietly reorder how text is displayed. They break string comparisons, search, regex, URLs and filenames. The Inspect tab names every code point using the full Unicode Character Database and cleans the text in one click.

It also flags confusable letters (a Cyrillic “а”, a Greek “ο”, a full-width “A”) using Unicode’s confusables table, warns when one word mixes writing systems as described in Unicode Technical Standard #39, and detects mojibake such as “café”. The Compare tab tests whether two strings differ only by normalization, invisible characters, letter case or lookalike letters, and the Domain check tab shows the xn-- name the browser really connects to and which scripts each part uses.

The Search tab finds any character by name, keyword or code point. Open one to see its name and aliases, general category, script, UTF-8 bytes and normalization forms, and copy it as an HTML entity, a JavaScript, JSON, CSS, PHP, Python or SQL escape, raw bytes, or the character itself. Whatever you select, the readouts and Show Work give its code point, UTF-8 bytes and UTF-16 units, worked out bit by bit.

Everything runs in your browser; nothing you type is sent anywhere.

Related tools: Mojibake Repair, Text Diff, and Regex Tester.

Frequently Asked Questions

Why do two strings that look identical compare as different?

Usually one of four reasons: an invisible character (a zero-width space, U+200B, is 3 UTF-8 bytes, E2 80 8B, and no width), a different space (a no-break space, U+00A0, looks like U+0020), a different encoding of the same letter, or a lookalike letter from another alphabet. “café” typed with the single code point é is 4 code points and 5 UTF-8 bytes (63 61 66 C3 A9); written as “e” plus the combining acute accent U+0301 it is 5 code points and 6 bytes (63 61 66 65 CC 81). The Compare tab tests for each of these and highlights the exact characters that differ.

How does it spot lookalike letters and spoofed domains?

It uses Unicode’s own confusables table (UTS #39, 6,712 entries in version 18) and shows which Latin letter each impostor imitates. A lookalike is flagged only when it is out of place: a Greek omicron in Greek text is normal, the same letter inside an English word is not. “аррӏе.com” is five Cyrillic letters (U+0430, U+0440, U+0440, U+04CF, U+0435), and the Domain check tab shows that the browser really connects to xn--80ak6aa92e.com, not apple.com.

What is mojibake and can this fix it?

Mojibake is garbled text that appears when bytes are decoded with the wrong character set. In UTF-8 the letter é is the two bytes C3 A9; read as Windows-1252, C3 is “Ô and A9 is “©”, so “café” turns into “café”. Unicode Lab spots these byte patterns and re-decodes them in one click. Characters already replaced by � cannot be recovered; the Mojibake Repair tool shows every reading and which bytes were lost.

Why does my emoji count as more than one character?

Many emoji are built from several code points. The family 👨‍👩‍👧 is three people joined by two zero-width joiners (U+200D): one visible character, 5 code points, 8 UTF-16 units (its JavaScript .length) and 18 UTF-8 bytes. A flag is two regional-indicator letters (🇺🇸 is U+1F1FA U+1F1F8, 8 UTF-8 bytes), and a skin tone is a modifier added to the base emoji. Unicode Lab shows the whole emoji as one character with its official name and lists each part underneath.

How many characters does it know, and is my text uploaded?

The names come from the Unicode Character Database, version 18: 172,808 named code points, plus 2,770 named emoji sequences such as flags, skin tones and families. The popular characters are listed first so common searches stay quick to scan. The database is downloaded once from this site, like a font; the analysis, comparison, domain check and cleanup all run in your browser, and nothing you type is sent to a server.

How do I use the Unicode Lab?

Simply type your numbers and read the result, which refreshes the instant you change something. There is nothing to submit and nothing to wait for.

Is it free? Does it work without internet?

Yes to both. It is free with no sign-up, and once the page has loaded it keeps working even with no internet.

Where does my data go?

Nowhere — every calculation runs on your own device. Nothing you enter is uploaded, logged, or stored.

Common Use Cases

Debug a string that won’t match

Find the zero-width space (U+200B, 3 invisible bytes) or no-break space breaking a comparison or regex, or compare the two strings side by side.

Check a suspicious link

аррӏе.com really goes to xn--80ak6aa92e.com: five Cyrillic letters dressed up as apple.com.

Clean copied content

Strip invisible junk, swap lookalike letters back to Latin, and turn café back into café before pasting into a CMS or code.

Find any character

Type U+2014 or “em dash” and copy it as —, a JavaScript escape or its UTF-8 bytes E2 80 94.

Size text against a byte limit

A 160-byte field holds 160 ASCII letters but only 40 emoji such as 😀, which is 4 UTF-8 bytes each.

Last updated: