Text to Unicode Codepoints
Convert text to Unicode code points (U+XXXX) and back — hex, decimal, and escape formats.
Characters: 0
How Unicode code points work
Every character in Unicode is assigned a unique integer called a code point. For example, the letter "A" is U+0041, the euro sign "€" is U+20AC, and the rocket emoji "🚀" is U+1F680. Code points are written in hexadecimal with a U+ prefix, but can also be expressed as decimals or as escape sequences like A (for BMP characters) or \u{1F680} (for characters above U+FFFF).
For per-character Unicode details, see Unicode Character Info. To escape JSON strings, try JSON Escape / Unescape.
Built and maintained by Meet Shah · Last updated
What this tool is used for
- Producing code points to identify an unexpected character precisely.
- Building an escaped representation for a format that cannot carry the characters.
- Checking whether two similar-looking strings are the same characters.
- Producing a code point list for a bug report about encoding.
- Confirming how many code points a visible character actually uses.
Frequently Asked Questions
- What is the U+ notation?
- The Unicode standard's own way of writing a code point: U+ followed by at least four hexadecimal digits, upper case. U+0041 is A. Four digits cover the Basic Multilingual Plane; anything above it, such as an emoji at U+1F600, takes five or six.
- Is a code point the same as a character?
- Not quite. An emoji with a skin tone is two code points, a flag is two, and a family emoji can be seven joined by U+200D. What a reader calls one character is a grapheme cluster, which is why the code-point count is usually higher than the visible length.
- Which format should I choose?
- U+XXXX for documentation and bug reports, `\uXXXX` for JavaScript, Java or JSON string literals, and decimal for HTML numeric entities. Note that `\u` in most languages takes exactly four digits — astral characters need `\u{1F600}` or a surrogate pair.
- What is a surrogate pair?
- How UTF-16 stores a code point above U+FFFF: two units in the D800–DFFF range that together encode one character. This tool reports the real code point rather than the pair, which is why an emoji shows as one U+1F600 and not as two mysterious D-values.
- What is it good for?
- Identifying the character that broke something. A pasted string with a non-breaking space (U+00A0), a smart quote (U+2019), a zero-width joiner (U+200D) or a right-to-left mark (U+200F) looks normal and behaves strangely — decoding it names the culprit exactly.
- Why does one visible character produce several code points?
- Because emoji sequences, accented letters written in decomposed form, and flags are all built from multiple code points. What looks like one character is a grapheme cluster, which is a different unit entirely.
Common errors and gotchas
- Round-tripping a sequence and reassembling it in the wrong order, which changes the character.
- Confusing a code point with its UTF-8 or UTF-16 bytes, which are different numbers.
- Mixing hex and decimal without recording which, so the values are ambiguous.
- Producing escapes in a syntax the target language does not use.
- Splitting a surrogate pair and producing two invalid values instead of one character.
Related Text Tools tools
Case Converter
Convert between Sentence, Title, camelCase, snake_case, and more.
Word Counter
Count words, characters, and analyze keyword density.
Text to Binary
Convert text into its 8-bit binary representation.
Binary to Text
Decode 8-bit binary back into readable text.
Text Reverser
Reverse text by characters, words, or lines.
Remove Duplicate Lines
Delete repeated lines and keep your list unique.
Remove Empty Lines
Strip blank and whitespace-only lines from text.
Sort Lines Alphabetically
Sort lines A–Z or Z–A, case-sensitive or not.