UTF-16 Encoder
Enter text to see its UTF-16 code units in hexadecimal.
Result
How to use
- Enter your values in the fields above.
- Press Calculate to see your result instantly.
- Use the Share button to copy a link to your result.
About this calculator
UTF-16 encodes Unicode text as a sequence of 16-bit code units. Any character in the Basic Multilingual Plane (BMP, code points U+0000 through U+FFFF — which covers Latin, Cyrillic, Greek, most CJK ideographs, and far more) is represented directly as a single 16-bit code unit equal to its code point. Characters outside the BMP — code points from U+10000 up through U+10FFFF, which include emoji, many historic and less-common scripts, and supplementary CJK ideographs — can’t fit in 16 bits, so UTF-16 represents them with a surrogate pair: two 16-bit units drawn from reserved ranges that only ever appear together.
The surrogate pair is formed by subtracting 0x10000 from the code point to get a 20-bit value, then splitting it into a high 10 bits added to 0xD800 (giving a “high surrogate” in the range 0xD800–0xDBFF) and a low 10 bits added to 0xDC00 (a “low surrogate” in the range 0xDC00–0xDFFF). This matters directly to developers because JavaScript strings, Java chars, and the Windows API all use UTF-16 internally, which is why a single emoji can report a .length of 2 in JavaScript. This calculator encodes input text into its UTF-16 code units, showing each in hexadecimal and using surrogate pairs wherever needed.
Was this helpful?
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
No calculators found
Comments (0)