Unicode to UTF-16
Convert Unicode text to UTF-16 code units with surrogate pair details.
Paste text with emoji or non-Latin characters and get each code unit as UTF-16 hex, escape sequences, or decimal. Surrogate pairs show up as two units for anything above U+FFFF — the way JavaScript actually stores those characters. And everything runs in your browser. Nothing gets uploaded.
How It Works
Each character is converted to one or two UTF-16 code units. Characters in the Basic Multilingual Plane (U+0000–U+FFFF) use a single 16-bit code unit. Supplementary characters (U+10000 and above) are encoded as a surrogate pair: a high surrogate (0xD800–0xDBFF) followed by a low surrogate (0xDC00–0xDFFF). You can view the output in big-endian or little-endian byte order.
FAQ
What is UTF-16 encoding?
UTF-16 is a variable-length character encoding that uses one or two 16-bit code units to represent each Unicode code point. It's the native string encoding in JavaScript, Java, and C#.
What are surrogate pairs?
Surrogate pairs are two 16-bit code units used to represent characters above U+FFFF. The high surrogate (0xD800–0xDBFF) comes first, followed by the low surrogate (0xDC00–0xDFFF).
What's the difference between big-endian and little-endian?
Big-endian stores the most significant byte first (e.g., 0x00 0x48 for 'H'), while little-endian stores the least significant byte first (0x48 0x00). The endianness affects how bytes are arranged in memory.
Is my data processed securely?
Yes. All conversion happens entirely in your browser using JavaScript. Your text never leaves your device.