Text to Unicode
What is a Text To Unicode?
Every character you see on a screen has a Unicode code point, a unique number written as U+ followed by hex digits. Converting text to code points is how developers debug encoding issues, find invisible characters, write escape sequences in code and understand why two strings that look the same do not compare equal. This tool converts text to Unicode notation and back.
How to use it
- Type or paste text to see the code points or escape sequences of each character.
- Or paste code points or escapes to convert them back into text.
Example
The text Hé converts to:
- Code points:
U+0048 U+00E9 - HTML entities:
Hé - JavaScript escapes:
\u0048\u00E9
Finding hidden characters
Text copied from websites, Word or chat apps often contains invisible characters that break code and data:
U+200Bzero-width spaceU+00A0non-breaking space, which looks like a normal spaceU+FEFFbyte order mark at the start of filesU+2019curly apostrophe instead of a straight one
Converting the text to code points reveals them immediately.
Looks the same, is not the same
é can be one code point (U+00E9) or two: e plus a combining acute accent (U+0065 U+0301). They render identically but are different strings. Normalise text to NFC before comparing or storing it, for example with str.normalize('NFC') in JavaScript.
Frequently Asked Questions
What is a Unicode code point?
A unique number assigned to each character, written as U+ followed by hexadecimal digits, such as U+0041 for A.
How do I find invisible characters in text?
Convert the text to code points and look for values like U+200B, U+00A0 or U+FEFF.
Why do two identical-looking strings not match?
They may use different code point sequences, such as a precomposed é versus e plus a combining accent. Normalise both to NFC first.
How do I write a Unicode character in JavaScript?
Use the escape backslash u followed by 4 hex digits, or backslash u with braces for code points above FFFF.