Convert text to Unicode code points and escapes — and back
This text to Unicode converter shows exactly which characters a piece of text is made of and writes them in the form you need: Unicode code points such as U+1F600, JavaScript and JSON escapes (\uD83D\uDE00, with the surrogate pair worked out for you), ES6-style \u{1F600}, Python’s \U0001F600, \xHH UTF-8 bytes, HTML entities, CSS escapes, or raw UTF-8 and UTF-16 values. Switch to “Unicode → Text” and it reads any of those forms back — even a mixture of them in one string.
Underneath, a character inspector lists every code point with its name or category, its Unicode block and script, and its UTF-8, UTF-16 and HTML forms. A normalization panel compares NFC, NFD, NFKC and NFKD, and a checker flags hidden characters — zero-width spaces, direction overrides, byte-order marks — and look-alike letters such as a Cyrillic “а” posing as a Latin “a”.
Developers debugging encodings, translators checking accents, security teams looking for spoofed names and students learning how text is stored will all find what they need here. Everything runs in your browser.
How to use the Text to Unicode Converter
- Choose “Text → Unicode” and type or paste text. The encoded form appears on the right as you type.
- Pick a format. For U+ lists, bytes and decimal values choose a separator; for escape formats you can escape only non-ASCII characters and keep plain letters readable.
- To decode, choose “Unicode → Text”, paste escapes, entities, code points or hex bytes, and leave “Auto-detect” on or pick the exact format.
- Check the warnings list and the character inspector to see names, blocks, scripts and byte values for each character.
- Copy the result, or press “Swap direction” to send it back through the other way and confirm the round trip.
Text to Unicode Converter features
Eleven output formats
U+ code points, \u with surrogate pairs, \u{…}, \U, \xHH, HTML decimal and hex, CSS, UTF-8 bytes, UTF-16 units and decimal code points.
Decodes mixed input
Auto-detect reads \u, \u{}, \U, \x, U+, &#…; and named entities, %XX percent-encoding and CSS escapes wherever they appear, leaving other text untouched.
Character inspector
Every code point with its name (for common and special characters) or its general category, plus block, script, UTF-8, UTF-16 and HTML values.
Normalization compared
See at a glance whether NFC, NFD, NFKC and NFKD change your text, how many code points each form has, and copy any of them.
Hidden-character checks
Flags zero-width and format characters, bidirectional overrides, unusual spaces, replacement characters, unpaired surrogates and Cyrillic, Greek or full-width look-alikes.
The same emoji in every format
😀 is a single character, code point U+1F600. Here is how each format writes it:
| Format | 😀 written as | Where it is used |
|---|---|---|
| Code point | U+1F600 | Unicode charts, documentation, font tools |
| JavaScript / JSON | \uD83D\uDE00 | JS and JSON strings, Java, C# — two UTF-16 units (a surrogate pair) |
| ES6 / PHP / Swift / Rust | \u{1F600} | Modern JavaScript and several other languages |
| Python / C / C++ | \U0001F600 | Eight hex digits for characters beyond U+FFFF |
| \xHH bytes | \xF0\x9F\x98\x80 | UTF-8 bytes in C strings, Python bytes, shell printf |
| HTML | 😀 or 😀 | HTML and XML documents |
| CSS | \1F600 | The content property and selectors |
| UTF-8 / UTF-16 | F0 9F 98 80 / D83D DE00 | Byte dumps, network captures, file formats |
Code points, UTF-8 and UTF-16 in brief
Unicode gives every character a number, its code point, from U+0000 to U+10FFFF. Encodings decide how that number is stored. UTF-8 uses one byte for ASCII, two for most European and Middle Eastern letters, three for Indian scripts, Chinese and the ₹ sign, and four for emoji. UTF-16 uses one 16-bit unit up to U+FFFF and a pair of “surrogates” (D800–DBFF followed by DC00–DFFF) above that, which is why JavaScript reports "😀".length as 2.
Several code points can make one visible character: 👨👩👧 is three emoji joined by two zero-width joiners, and नमस्ते is six code points. The inspector lists code points, not visible characters, so you can see every piece.
Normalization forms
NFC is the form the W3C recommends for the web and the safest choice for storing and comparing text. The K forms also fold compatibility characters such as ligatures, circled digits and full-width letters into plain ones, which helps search but loses formatting. Copy a normalized form from the panel, or clean pasted text further with the Text Cleaner.
| Input | NFC | NFD | NFKC / NFKD |
|---|---|---|---|
| é (U+00E9) | unchanged | e + U+0301 combining acute | é (NFKC) / e + U+0301 (NFKD) |
| fi ligature (U+FB01) | unchanged | unchanged | “fi” — two letters |
| ① (U+2460) | unchanged | unchanged | “1” |
| Å angstrom sign (U+212B) | Å U+00C5 | A + U+030A | Å U+00C5 / A + U+030A |
Hidden and look-alike characters
A username, domain or password can contain characters that look identical to ordinary ones: Cyrillic “а” (U+0430) beside Latin “a”, a zero-width space inside a word, or a right-to-left override that makes code display in a different order from how it runs. The checker names each one and says why it matters. To insert an invisible character on purpose, use the Invisible Character tool; for byte-level binary or hex, see Text to Binary, and for escaping whole strings, the JSON Escape and HTML Entity Encoder tools.
Text to Unicode Converter FAQ
How do I convert text to Unicode?
Type or paste the text with “Text → Unicode” selected and pick a format. Code points appear as U+0048 U+0069 for “Hi”; choose JavaScript, HTML, CSS or byte formats for code. Press “Copy result” to use it.
How do I convert \u escapes back to text?
Choose “Unicode → Text” and paste the escapes. Auto-detect handles \uXXXX (pairing surrogates such as \uD83D\uDE00 into one emoji), \u{…}, \U, \x, U+, HTML entities and percent-encoding, even mixed together.
Why does an emoji become two \u escapes?
JavaScript, JSON and Java store text as UTF-16, where characters above U+FFFF need two 16-bit units, a high and a low surrogate. U+1F600 is stored as D83D DE00, so it is written \uD83D\uDE00. ES6 code can use \u{1F600} instead.
What is the difference between NFC and NFD?
NFC stores accented letters as single precomposed code points where possible (é = U+00E9); NFD splits them into a base letter plus combining marks (e + U+0301). They look identical but compare as different strings unless normalized.
Can this text to Unicode converter find invisible characters?
Yes. The “Hidden and look-alike characters” list names zero-width spaces and joiners, byte-order marks, direction marks and overrides, non-breaking and other unusual spaces, and letters from other alphabets that imitate Latin ones.
Is my text sent anywhere?
No. All conversion and analysis happens in your browser.