UTF-16 Encoding Table
Enter short text to view each character’s UTF-16 code units, BE/LE bytes, and BMP or surrogate-pair type, while retaining a quick reference to the surrogate ranges.
How to use the UTF-16 encoding table
UTF-16 code units and byte-order results are calculated only in the current browser; the text is not uploaded.
Enter short text
Enter at most 64 Unicode scalar values; the tool processes each character in the original order.
View code units
View one BMP code unit or a high- and low-surrogate pair character by character, along with the corresponding UTF-16BE and UTF-16LE bytes.
Check surrogate ranges
A single-character lookup links to BMP or surrogate-pair rules; you can copy TSV or clear the input.
Limitations and Notes
- The byte column displays only the code unit bytes in the specified byte order; it does not automatically add BOM or infer the file’s byte order.
- Supplementary-plane scalar values use two 16-bit code units; the number of code units cannot be directly treated as the number of user-visible characters.
- An isolated high or low surrogate is not a valid Unicode scalar value; the tool fails closed instead of generating replacement bytes.
FAQ
Why does an Emoji have two UTF-16 code units?
Supplementary Plane scalar values above U+10000 require one high surrogate and one low surrogate to be represented together.
Why do UTF-16BE and UTF-16LE have opposite byte orders?
Both represent the same 16-bit code unit; only the storage order of the high and low bytes in each code unit differs.
Will the page output include BOM?
No. This displays the encoding bytes for a single scalar; whether a file requires BOM depends on the specific format and protocol.