Unicode Text Converter

Convert text to Unicode code points (U+ notation), decimal, UTF-8 and UTF-16 hex.

Convert UTF-8 + UTF-16 Bidirectional
Rate this calculator

Unicode text converter

Text ↔ U+XXXX · UTF-8 · UTF-16 · decimal

Instructions — Unicode Text Converter

1

Pick a direction

Toggle "Text → Code points" or "Code points → Text". Default is encode mode — turn any text into its U+XXXX sequence.

2

Paste or type text

Mix Latin, CJK, emoji — anything. The converter iterates code points correctly, so counts as one code point (not two like JavaScript's naïve .length).

3

Copy any encoding

U+ notation, decimal, UTF-8 hex, UTF-16 hex — each has its own copy button. Useful for source code, database escape sequences, or font research.

Decode formats accepted: U+1F600, u+1f600, 0x1F600, 1F600, comma- or space-separated.
Emoji byte cost: = 1 code point but 4 UTF-8 bytes (and 2 UTF-16 surrogate units).

Formulas

A Unicode code point is just an integer between 0 and 0x10FFFF. UTF-8 and UTF-16 are two different ways to serialise that integer to bytes.

Unicode range
$$ 0 \leq \text{codepoint} \leq 0x10FFFF $$
About 1.11 million possible values. The Unicode 16 standard (2024) assigns about 155 000 of them.
UTF-8 byte count
$$ \text{bytes} = \begin{cases} 1 & cp \leq U+007F \\ 2 & cp \leq U+07FF \\ 3 & cp \leq U+FFFF \\ 4 & cp \leq U+10FFFF \end{cases} $$
ASCII fits in 1 byte. Latin accents and Greek 2 bytes. CJK 3 bytes. Emoji 4 bytes.
UTF-16 surrogate pair
$$ cp = 0x10000 + (H - 0xD800) \times 0x400 + (L - 0xDC00) $$
For code points above U+FFFF, UTF-16 uses two 16-bit units: a high surrogate (U+D800-DBFF) and a low surrogate (U+DC00-DFFF).
U+ notation
$$ \text{format} = \text{"U+" + hex(cp)} $$
Always written in hexadecimal with at least 4 digits. The grinning face emoji is U+1F600 — 5 hex digits, decimal 128 512.
ASCII subset
$$ \text{ASCII} = U+0000 \ldots U+007F $$
The first 128 code points are identical to 7-bit ASCII. UTF-8 was deliberately designed so every ASCII file is also a valid UTF-8 file.
Grapheme vs code point
$$ \text{visible char} \geq 1 \;\text{code point} $$
"é" can be one code point (U+00E9) or two (e + combining acute U+0301). Family emoji is 7 code points joined by ZWJ (U+200D).

Reference

Common Unicode blocks
BlockRangeContents
Basic Latin (ASCII)U+0000-007FA-Z, a-z, 0-9, ASCII punctuation
Latin-1 SupplementU+0080-00FFÀ-ÿ, accented letters
Latin Extended-AU+0100-017FCentral European: Ą Č Š Ž
GreekU+0370-03FFα β γ … ω, Α Β Γ
CyrillicU+0400-04FFRussian, Ukrainian, Bulgarian
ArabicU+0600-06FFا ب ت (right-to-left)
HiraganaU+3040-309Fあ い う え お (Japanese)
CJK Unified IdeographsU+4E00-9FFF20 992 Chinese / Japanese / Korean
Math AlphanumericU+1D400-1D7FF𝐀 𝒜 𝔄 𝔸 (styled letters)
Emoji and SymbolsU+1F300-1FAFF (mostly 4-byte UTF-8)

UTF-8 byte budget per script

Helpful when sizing varchar columns, API payloads, or assessing storage costs.

Latin / ASCII
SampleUTF-8 bytes
"Hello"5
"café"5 (é = 2 bytes)
"Łódź"7
"naïve résumé"15
CJK and Emoji
SampleUTF-8 bytes
"你好" (2 chars)6 (3 each)
"こんにちは" (5)15
"" (1 emoji)4
"" ZWJ family18 (5 cp + ZWJ)

Article — Unicode Text Converter

Unicode text converter — text to U+ code points and back

The Unicode text converter turns any text into its sequence of Unicode code points (in U+XXXX format) and back. It also displays UTF-8 bytes, UTF-16 units, and decimal code-point values. The Unicode range is U+0000 to U+10FFFF — about 1.1 million possible characters, with 155 000+ assigned in Unicode 16 (2024).

Unicode is the standard that assigns every written character a unique integer code point. ASCII (the original 128-character set from 1963) is the first slice — U+0000 to U+007F. Unicode then extends across every script in active use plus historical scripts, mathematical symbols, technical icons, and emoji.

What is a Unicode text converter?

A Unicode text converter takes a string and outputs its underlying numerical representation: the sequence of code points (U+XXXX), the UTF-8 bytes, the UTF-16 units, and decimal values. Reverse decoding is also supported — paste "U+1F600 U+0041" and the tool reconstructs the emoji and letter.

The converter has two main use cases. First, debugging: when text renders incorrectly (mojibake, missing glyphs, broken encoding), seeing the actual code points reveals what the bytes really are. Second, escape-code generation: HTML, JavaScript, CSS, and most programming languages have syntax for inserting Unicode by code point, and the converter formats it for direct paste.

Unicode code points and the U+ notation

A code point is just an integer between 0 and 0x10FFFF (1 114 112 possible values). The standard notation is "U+" followed by the hexadecimal value with at least 4 digits — U+0041 for "A", U+1F600 for "". Code points are abstract — they do not specify how the integer is stored. UTF-8 and UTF-16 are two different encoding schemes that turn code points into bytes.

  • U+0000 to U+007F = ASCII (128 characters)
  • U+0080 to U+07FF = Latin extended, Greek, Cyrillic, Hebrew, Arabic
  • U+0800 to U+FFFF = CJK, hiragana, katakana, Thai, Devanagari
  • U+10000 to U+10FFFF = supplementary plane: math symbols, emoji, rare scripts

UTF-8 vs UTF-16 in the Unicode text converter

UTF-8 encodes each code point as 1-4 bytes. ASCII characters use 1 byte (identical to ASCII files). Latin accents, Greek, Cyrillic use 2 bytes. CJK ideographs use 3 bytes. Emoji and rare scripts use 4 bytes. The variable-length scheme makes UTF-8 efficient for English-heavy text and the most common encoding on the web (95%+).

UTF-16 encodes each code point as 2 or 4 bytes. Characters in the Basic Multilingual Plane (U+0000 to U+FFFF) use 2 bytes; characters above U+FFFF use a surrogate pair of 4 bytes. UTF-16 is the internal string encoding of JavaScript, Java, Windows, and.NET. The Unicode text converter shows both encodings side by side so you can see the byte cost of any string.

Did you know

The emoji (party popper, U+1F389) is one code point. UTF-8: 4 bytes (F0 9F 8E 89). UTF-16: 2 surrogate units (D83C DF89). JavaScript's ''.length returns 2 because JavaScript counts UTF-16 units. Use [...str].length to get the code-point count (1).

Unicode text converter for emoji and CJK

Emoji live in the supplementary plane (U+1F300-1FAFF mostly). They are 4-byte UTF-8 sequences. Many emoji are actually multi-code-point sequences joined by zero-width joiner (U+200D). The family emoji is 5 separate code points stitched into a single rendered glyph. The Unicode text converter shows each component, useful for debugging emoji rendering issues.

CJK (Chinese, Japanese, Korean) ideographs occupy the largest contiguous Unicode block: U+4E00-9FFF holds 20 992 characters. Most everyday CJK text fits in this range and uses 3 UTF-8 bytes per character. Less common ideographs in CJK Extension blocks (U+20000-2FFFF) use 4 bytes.

Unicode text converter byte budgets (UTF-8)
ASCII letter = 1 byte café é = 2 bytes
Cyrillic letter = 2 bytes 中文 char = 3 bytes
emoji = 4 bytes ZWJ family = 4 cp + ZWJ

Major Unicode blocks

Unicode is organised into blocks, each covering a script or category. The Unicode text converter cannot enumerate all 320+ blocks, but the most common ones cover most everyday text. Basic Latin handles English and most Western European text without accents. Latin-1 Supplement and Latin Extended-A add accented letters for French, Spanish, Polish, Czech, and other European languages. Greek, Cyrillic, Hebrew, Arabic, and Devanagari each have dedicated blocks. CJK Unified Ideographs covers Chinese, Japanese, and Korean. Emoji and Symbols spans U+2000-2FFF (general symbols) and U+1F000-1FFFF (emoji, transport, signs).

Decoding U+ code points back to text

The Unicode text converter also runs in reverse: paste a sequence like "U+0048 U+0065 U+006C U+006C U+006F" and get back "Hello". The converter accepts several formats: "U+XXXX", "u+xxxx", "0xXXXX", or just "XXXX". Separators can be spaces, commas, or semicolons. This is useful when copying Unicode escapes from documentation or fixing broken text where the hex codes are visible but the rendered glyphs are not.

Common Unicode conversion mistakes

Unicode text converter pitfalls

Counting characters incorrectly: JavaScript's .length counts UTF-16 units, not code points. PHP's strlen() counts bytes, not characters. Always use code-point-aware functions (mb_strlen, [...str].length) for human-meaningful counts.

Storing UTF-8 in a 3-byte-only column: MySQL's old utf8 charset is actually a 3-byte subset and rejects emoji. Always use utf8mb4 for full Unicode support. PostgreSQL, SQLite, and SQL Server are full Unicode by default.

Confusing escape syntaxes across languages: HTML uses 😀, JavaScript uses '\u{1F600}' (with braces), Python uses '\U0001F600' (8 hex digits), CSS uses "1F600 " (space-terminated). The Unicode text converter formats each correctly so you can copy directly.

Unicode text converter quick rules

To check whether a string contains emoji: look at the code points — anything above U+FFFF is supplementary plane (probably emoji or rare CJK). To estimate UTF-8 byte size: ASCII is 1 byte, accents 2, CJK 3, emoji 4 — multiply character counts accordingly. To debug rendering: paste the broken text into the Unicode text converter; if code points are sensible, the font is missing; if code points are nonsense, the encoding is wrong (often Latin-1 misinterpreted as UTF-8 or vice versa).

When designing a database column or API field, know the byte budget of your character set. A VARCHAR(255) UTF-8 column stores up to 255 characters of ASCII, but only ~63 characters if all emoji (255 ÷ 4 bytes). For tweet-style 280-character limits, the actual byte ceiling is 280 × 4 = 1120 bytes worst case. The Unicode text converter shows the exact byte count for any string so you can plan storage and bandwidth accordingly.

FAQ

A code point is the integer that identifies a single character in the Unicode standard, written as U+XXXX in hexadecimal. The range is U+0000 to U+10FFFF (1 114 112 possible values). About 155 000 are currently assigned in Unicode 16, covering 168 scripts. The letter "A" is U+0041; the grinning face emoji is U+1F600.
They are different encodings of the same Unicode code points. UTF-8 uses 1-4 bytes per code point — ASCII is just 1 byte (same as old text files). UTF-16 uses 2 or 4 bytes. UTF-8 wins for English-heavy text and the web (95%+ of web pages are UTF-8). UTF-16 is used internally by Windows, Java, and JavaScript strings.
JavaScript strings are UTF-16. Code points above U+FFFF (including most emoji) need a surrogate pair — two UTF-16 code units. ''.length returns 2. Use [...str].length or Array.from(str).length for the true code-point count. This converter shows both values.
In HTML: 😀 or 😀. In JavaScript: '\u{1F600}' (with the curly braces). In Python: '\U0001F600' (8 hex digits) or chr(0x1F600). In C#: char.ConvertFromUtf32(0x1F600). In CSS content: content: "\1F600 " (trailing space).
Yes. It iterates by code point (the for...of loop in JavaScript), which is correct for emoji, CJK ideographs, surrogate pairs, and combining marks. It does not split emoji families joined by ZWJ (U+200D) into separate emoji — that is the correct behaviour at the code-point level.
Code points above U+FFFF cannot fit in a 16-bit unit. UTF-16 splits them into a high surrogate (U+D800-DBFF) plus a low surrogate (U+DC00-DFFF). Together they encode 1 048 576 supplementary code points. UTF-8 has no surrogates — it just uses 4 bytes directly for the same range.
Old MySQL utf8 is actually 3-byte UTF-8, which cannot store 4-byte code points like emoji. Use utf8mb4 (full 4-byte UTF-8). All new tables should default to CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci. PostgreSQL, SQLite, and SQL Server already support full Unicode by default.
U+200D (zero-width joiner) sticks multiple code points together to form one rendered glyph. The emoji is 5 code points joined by ZWJ ( + ZWJ + + ZWJ + ) but renders as a single icon when the font supports the sequence. Rainbow flag, doctor, mixed-skin-tone families — all built with ZWJ sequences.