Unicode Converter

Convert text and symbols to/from \uXXXX escape sequences, encode/decode HTML entities (decimal / hex), optionally touching non-ASCII characters only. 100% client-side.

Mode
Input
Output
Pick a mode, then click “Encode” or “Decode”.

Code point, encoding, and glyph are three different things

TermWhat it isExample
Code pointAn abstract character numberU+00E9 = é
EncodingHow that number is stored in bytesUTF-8 uses two bytes: C3 A9
GlyphWhat is drawn on screenDepends on the font

Unicode defines more than 149,000 code points. UTF-8, UTF-16 and UTF-32 are three ways to serialise them. UTF-8 is dominant on the web because it is byte-order independent, backwards-compatible with ASCII, and self-synchronising, so a corrupted byte damages only a short sequence.

Why "character count" often lies

The fix is to count grapheme clusters — the units a reader perceives — rather than bytes or code units. Use the platform's segmentation API, not a loop over the string.

Normalisation: two identical-looking strings that are not equal

Because the same character can be composed in different ways, two strings can look identical on screen and compare as unequal. Unicode defines four normal forms to resolve this: NFC (composed) and NFD (decomposed), plus compatibility variants NFKC and NFKD that additionally fold things like ligatures and full-width forms. The practical rule is to normalise user input before comparing, sorting or storing it — otherwise duplicate entries appear that differ only in invisible ways.

Text direction and locale

Unicode carries a bidirectional algorithm so that right-to-left scripts mix correctly with left-to-right ones, and it separates locale-independent case mapping from locale-specific rules. For example, the Turkish dotless i means that a naive uppercase conversion produces the wrong letter in Turkish. Use a locale-aware library for anything beyond the basics.

How many bytes each encoding actually costs

The three encodings trade space in different directions, and the difference is large enough to matter for storage and payload limits:

CharacterCode pointUTF-8UTF-16UTF-32
AU+0041124
éU+00E9224
€U+20AC324
中U+4E2D324
😀U+1F600444

UTF-8 spends one byte per ASCII character and grows to two, three and four bytes as code points get larger. UTF-16 is flat at two bytes for everything in the basic multilingual plane, which makes it compact for CJK text and wasteful for plain English. UTF-32 is always four bytes — simple to index, four times the size of ASCII in UTF-8.

The practical consequence: a document that is 1 MB of English is roughly 1 MB in UTF-8 but 2 MB in UTF-16, while the same 1 MB of Chinese is near 3 MB in UTF-8 and about 2 MB in UTF-16. Choose per workload rather than per habit, and remember that the byte counts shown by a language runtime usually refer to the string's internal representation, not to what gets written to disk.

Related tools

HTML entities ASCII table Base64 encoder

FAQ

What does the \uXXXX notation mean?
It is a Unicode escape sequence common in JavaScript, JSON, Java and other language strings. XXXX is the hexadecimal code point of the character — for example \u4e2d is 中 and \u0041 is A. This tool converts text into that form and back.
What's the difference between Unicode and UTF-8?
Unicode is a character-to-code-point numbering standard that assigns every character a unique number (e.g. U+4E2D); UTF-8 is a specific encoding that stores those numbers as bytes. This tool works at the code-point level, which is a different thing from a file's UTF-8 encoding.
What is an HTML entity?
An HTML entity is a &-prefixed reference used to represent special characters in web pages — e.g. 中 (decimal) or 中 (hex) both mean 中. This tool converts both ways between text and HTML entities.
Is my content uploaded?
No. All encoding and decoding happen locally in your browser; your input is never sent to a server.