What Is Unicode?
Unicode is the international standard used to represent text consistently across computers, phones, websites, programming languages and operating systems.
On this page
What problem does Unicode solve?
Before Unicode became the common text standard, many systems used separate character sets and code pages. A byte value that meant one character on one computer could mean a different character on another. Text copied from an old database, email program or document editor could arrive as unreadable symbols because the receiving system guessed the wrong character set.
This was especially painful for multilingual text. ASCII handled basic English letters, digits and punctuation, but it could not represent Greek, Cyrillic, Arabic, Han characters, accented Latin text or emoji. Different regions solved that limitation with local encodings, but those encodings were not enough for a web page, document or database field that needed several languages at once.
Unicode solves the problem by giving software a shared repertoire of characters and a stable number for each one. It is not a font, and it does not decide the exact shape of a letter on screen. Fonts draw glyphs. Unicode defines the characters that software stores, exchanges, searches and compares.
How Unicode represents characters
Unicode describes abstract characters and assigns code points to them. That sounds formal, but the practical idea is simple: software needs a stable way to say “this is LATIN CAPITAL LETTER A” or “this is GRINNING FACE” before a font can draw it or an encoding can store it as bytes.
Characters
A character is the abstract unit of text, such as A, é, Ж, 字 or 😀. A glyph is the visual drawing supplied by a font. The same character can have different glyphs in different typefaces. An encoded value is the byte sequence used to store that character in a format such as UTF-8.
Code points
A code point is the unique number assigned by Unicode. It is commonly written as U+ followed by hexadecimal digits.
| Character | Unicode name | Code point |
|---|---|---|
| A | LATIN CAPITAL LETTER A | U+0041 |
| é | LATIN SMALL LETTER E WITH ACUTE | U+00E9 |
| Ж | CYRILLIC CAPITAL LETTER ZHE | U+0416 |
| 字 | CJK UNIFIED IDEOGRAPH-5B57 | U+5B57 |
| 😀 | GRINNING FACE | U+1F600 |
What U+XXXX means
The U+ prefix identifies Unicode code-point notation. The remaining digits are hexadecimal, so U+00E9 means hexadecimal 00E9. Code points are not the same as UTF-8 bytes: é is one code point, U+00E9, but in UTF-8 it is stored as two bytes, C3 A9.
Unicode example
A → U+0041 → UTF-8 byte 41
é → U+00E9 → UTF-8 bytes C3 A9
😀 → U+1F600 → UTF-8 bytes F0 9F 98 80
The code point is stable. The byte representation depends on the encoding. UTF-8, UTF-16 and UTF-32 can store the same Unicode code point with different units and byte layouts.
Processed locally in your browser. Enter one character to see common Unicode values.
Unicode vs UTF-8
Unicode and UTF-8 are related, but they are not interchangeable terms. Unicode defines characters and code points. UTF-8 is an encoding that stores those code points as bytes. UTF-8 uses one to four bytes per code point, and ASCII characters keep the same byte values they had in ASCII.
| Concept | Unicode | UTF-8 |
|---|---|---|
| Purpose | Defines characters and code points | Encodes code points as bytes |
| Example | é is U+00E9 | é becomes C3 A9 |
| Type | Character standard | Variable-length encoding |
| Storage | Does not by itself define bytes | Uses 1–4 bytes |
For a deeper comparison, read Unicode vs UTF-8 or try the UTF-8 Encoder and Decoder.
Unicode vs ASCII
ASCII contains 128 basic characters: English letters, digits, punctuation and control codes. Unicode includes ASCII as its first 128 code points, so A is still U+0041. UTF-8 preserves ASCII byte compatibility, which helped it become the dominant encoding for the web.
A works in ASCII and Unicode. é, Ж, 字 and 😀 require Unicode because ASCII has no way to represent them.
| Feature | ASCII | Unicode |
|---|---|---|
| Character count | 128 code values | More than a million possible code points |
| Languages | Basic English text | Modern and many historic scripts |
| Emoji | No | Yes, through code points and sequences |
| Relationship | Subset of Unicode | Includes ASCII at U+0000–U+007F |
UTF-8, UTF-16 and UTF-32
Unicode transformation formats define how code points are represented for storage and processing. UTF-8 is compact for ASCII-heavy text and common on the web. UTF-16 is used by JavaScript, Java and many Windows APIs. UTF-32 uses a fixed 32-bit code unit for each code point, which can simplify some processing but uses more space.
| Encoding | Unit size | Typical length | Common use |
|---|---|---|---|
| UTF-8 | 8 bits | 1–4 bytes | Web, APIs, files, Linux |
| UTF-16 | 16 bits | 1–2 code units | JavaScript, Java, Windows APIs |
| UTF-32 | 32 bits | 1 code unit for each code point | Specialized processing |
One UTF-16 code unit does not always equal one character. Code points above U+FFFF, such as many emoji, use surrogate pairs in UTF-16. UTF-32 gives one code unit per code point, but that still does not guarantee one code unit per user-perceived character because grapheme clusters can contain multiple code points.
Code points, code units and grapheme clusters
When debugging text, it helps to separate bytes, code units, code points and grapheme clusters. Bytes are storage units. Code units are the units used by an encoding such as UTF-16. Code points are Unicode numbers. Grapheme clusters are what users often perceive as one character.
The family emoji 👨👩👧👦 may appear as one emoji, but it contains multiple code points joined by zero-width joiners. The letter é can be represented as the single code point U+00E9, or as U+0065 U+0301: the letter e followed by a combining acute accent.
Use the Unicode Sequence Analyzer to inspect these layers, and the Unicode Character Counter when code-point counts are not enough.
Combining characters and normalization
café → U+0063 U+0061 U+0066 U+00E9
café → U+0063 U+0061 U+0066 U+0065 U+0301
These two strings can look the same while their code-point sequences differ. Direct comparisons may fail, search indexes may miss matches and filenames may behave differently across systems. Unicode normalization converts equivalent representations into consistent forms.
The common normalization forms are NFC, NFD, NFKC and NFKD. NFC is often used for stored text because it prefers composed characters where possible. NFD decomposes characters into base letters and combining marks. Compatibility forms, NFKC and NFKD, also fold compatibility characters.
For details, read Unicode Normalization Explained, then try the Unicode Normalizer and Unicode Normalization Checker.
Does Unicode include emoji?
Yes. Unicode assigns code points and sequences used for emoji, but it does not control exact artwork. The same emoji can look different on Apple, Android, Windows or a web font because each platform supplies its own glyph design.
Some emoji are simple single code points. Others use variation selectors, skin-tone modifiers, regional indicators or zero-width joiners. That is why one displayed emoji can contain several code points. The Unicode Character Inspector and Unicode Sequence Analyzer are useful when emoji behavior is surprising.
Common Unicode problems
Broken text or mojibake
Broken text such as Français or It’s usually means bytes were decoded with the wrong encoding. Try Mojibake Repair and the UTF-8 Validator.
Invisible characters
Zero-width spaces, non-breaking spaces, directional controls and soft hyphens can change text without being obvious. Use the Invisible Character Detector or Invisible Character Remover.
Identical-looking strings that do not match
Normalization, combining characters, confusable scripts and hidden formatting characters can make text look identical while comparing differently. Use Unicode Text Compare and the Confusable Character Detector.
Incorrect length counts
Some programming environments count UTF-16 code units or code points, not user-perceived characters. Use the Unicode Character Counter to compare counts.
Database and API corruption
Use explicit UTF-8 configuration, validate text at system boundaries, keep encodings consistent, and avoid repeated encode/decode operations that can damage data.
How developers work with Unicode
JavaScript
const text = "café";
const normalized = text.normalize("NFC");
for (const character of text) {
console.log(character, character.codePointAt(0).toString(16));
}
In JavaScript, String.length counts UTF-16 code units. Iterating with for...of handles code points better than indexing, but grapheme clusters still need segmentation.
Python
import unicodedata
text = "cafe\u0301"
normalized = unicodedata.normalize("NFC", text)
print([f"U+{ord(char):04X}" for char in normalized])
Python strings are Unicode strings. The unicodedata module provides names, categories and normalization.
PHP
$text = "café";
echo mb_strlen($text, "UTF-8");
if (class_exists(Normalizer::class)) {
$normalized = Normalizer::normalize($text, Normalizer::FORM_C);
}
In PHP, use multibyte-aware functions for Unicode text and the Intl extension when normalization is required.
Try these Unicode tools
UnicodeNow is tools-first. These pages help you inspect the exact string you are working with rather than relying on how it looks on screen.
Unicode Character Inspector
Inspect each Unicode character, encoding, category, script and normalization form.
Unicode Normalizer
Normalize Unicode text to NFC, NFD, NFKC or NFKD.
UTF-8 Encoder and Decoder
Convert text to UTF-8 bytes and validate byte sequences.
Invisible Character Detector
Find zero-width, control, variation, private-use and spacing characters.
Unicode Sequence Analyzer
Analyze code points, grapheme clusters, bytes, scripts and directionality.
Unicode Character Counter
Count code points, grapheme clusters, words, bytes and invisible characters.
Frequently asked questions
Is Unicode the same as UTF-8?
No. Unicode defines characters and code points; UTF-8 encodes those code points as bytes.
Is Unicode a font?
No. Fonts provide visual glyphs for Unicode characters. Unicode defines the characters and their code points.
Does Unicode include every language?
Unicode covers modern and many historic writing systems, but fonts and software may not support every assigned character.
What does U+ mean?
U+ is the conventional prefix for a Unicode code point written in hexadecimal notation.
Can two Unicode strings look identical but compare differently?
Yes. Combining marks, normalization forms, invisible characters and confusable scripts can make strings look alike while their code points differ.
How many bytes does a Unicode character use?
It depends on the encoding and the code point. UTF-8 uses one to four bytes per code point.
Does one code point always equal one visible character?
No. A user-perceived character can be a grapheme cluster made from multiple code points.
Should every string be normalized?
No. Normalize at intentional boundaries where consistent comparison, indexing or identifiers require it.