UTF-16 Unicode Utility

UTF-16 Encoder Decoder

Encode Unicode text into UTF-16LE or UTF-16BE hexadecimal, decimal or binary bytes, or decode UTF-16 byte sequences back into readable text. Inspect UTF-16 code units, byte order, BOM values, surrogate pairs and Unicode code points with strict validation.

✓ UTF-16 Encoder ✓ UTF-16 Decoder ✓ UTF-16LE ✓ UTF-16BE ✓ BOM Support ✓ Surrogate Pairs
U16
UTF-16 Encode / Decode
● Ready
Enter Unicode text. The encoder will convert it into UTF-16 bytes.
Conversion Options
UTF-16: Most Basic Multilingual Plane characters use one 16-bit code unit. Unicode characters above U+FFFF use a surrogate pair containing two 16-bit code units. Byte order determines how each code unit is stored.
UTF-16 Encoding Result Encoded
UTF-16 Hex Bytes
Characters
UTF-16 Bytes
Code Units
Code Points
Hex Bytes
Decimal Bytes
Byte Order
BOM
Unicode / UTF-16 Code Unit Breakdown
UTF-16 Conversion Details

UTF-16 Encoder Decoder

The UTF-16 Encoder Decoder converts Unicode text into UTF-16 byte sequences and converts UTF-16 bytes back into Unicode text. It supports both UTF-16 little-endian and UTF-16 big-endian byte order so you can inspect how the same 16-bit code unit is stored in different systems.

You can display UTF-16 data as hexadecimal bytes, decimal byte values or eight-bit binary groups. The converter also shows Unicode code points, UTF-16 code units, byte counts, surrogate pairs and Byte Order Mark information.

This makes the tool useful for software development, file-format analysis, protocol debugging, reverse engineering, Unicode education, database troubleshooting and inspecting encoded binary data.

How to Encode Text to UTF-16

Select Encode Text → UTF-16, choose little-endian or big-endian byte order and enter the Unicode text you want to convert. You may also choose whether a UTF-16 Byte Order Mark should be added.

The converter processes each Unicode code point and creates the appropriate UTF-16 code unit or surrogate pair before arranging the bytes according to the selected byte order.

Text: ABC UTF-16LE: 41 00 42 00 43 00 UTF-16BE: 00 41 00 42 00 43

How to Decode UTF-16 Bytes

Select Decode UTF-16 → Text, choose the input byte format and specify the expected byte order. Hexadecimal UTF-16 data may be entered as separated bytes such as 41 00 AC 20 or as a continuous hexadecimal sequence.

UTF-16LE bytes: AC 20 Decoded character: € Unicode: U+20AC

When BOM detection is selected, the decoder checks the beginning of the byte stream for FF FE or FE FF and uses that marker to determine the correct endianness.

UTF-16LE vs UTF-16BE

UTF-16 stores data in 16-bit code units, but those 16 bits are physically stored as two eight-bit bytes. Little-endian and big-endian systems place those bytes in opposite orders.

Character Code Unit UTF-16LE UTF-16BE
A 0041 41 00 00 41
20AC AC 20 20 AC
4E2D 2D 4E 4E 2D

Changing byte order does not change the Unicode character itself. It only changes the sequence in which the two bytes of each 16-bit code unit are stored.

UTF-16 Byte Order Mark

A Byte Order Mark, commonly abbreviated BOM, may appear at the beginning of UTF-16 data to indicate byte order. The Unicode value used for the marker is U+FEFF.

UTF-16LE BOM: FF FE UTF-16BE BOM: FE FF

When a UTF-16 decoder sees FF FE at the beginning of a byte stream, it can interpret the following data as little-endian. FE FF indicates big-endian storage.

Not every UTF-16 data source includes a BOM, so applications may also need to know the byte order from external metadata or protocol rules.

UTF-16 Code Units Explained

UTF-16 represents Unicode using 16-bit code units. Most Unicode code points between U+0000 and U+FFFF can be represented by a single code unit. The surrogate range U+D800 through U+DFFF is reserved for representing supplementary Unicode characters.

Character: € Unicode code point: U+20AC UTF-16 code unit: 20AC Code units: 1 Bytes: 2

UTF-16 Surrogate Pairs

Unicode characters above U+FFFF cannot fit directly into one 16-bit UTF-16 code unit. UTF-16 represents these supplementary code points using two code units called a surrogate pair.

The first value is a high surrogate in the range D800–DBFF. The second is a low surrogate in the range DC00–DFFF.

Character: 😀 Unicode: U+1F600 UTF-16 code units: D83D DE00 UTF-16LE bytes: 3D D8 00 DE UTF-16BE bytes: D8 3D DE 00 Code units: 2 Bytes: 4

UTF-16 Encoding Example for the Euro Sign

The euro sign has Unicode code point U+20AC. Since U+20AC is inside the Basic Multilingual Plane and outside the surrogate range, it needs only one UTF-16 code unit.

Character: € Code point: U+20AC UTF-16 code unit: 20AC UTF-16LE: AC 20 UTF-16BE: 20 AC Decimal UTF-16LE: 172 32 Binary UTF-16LE: 10101100 00100000

UTF-16 Encoding Example for Emoji

The grinning face emoji has code point U+1F600, which is above U+FFFF. It therefore requires a UTF-16 surrogate pair rather than a single 16-bit code unit.

Character: 😀 Unicode: U+1F600 High surrogate: D83D Low surrogate: DE00 UTF-16LE: 3D D8 00 DE UTF-16BE: D8 3D DE 00

UTF-16 vs UTF-8

UTF-8 and UTF-16 can represent the same Unicode code points but use different storage strategies. UTF-8 uses one to four eight-bit bytes per code point, while UTF-16 uses one or two 16-bit code units.

Character Unicode UTF-8 UTF-16 Units
A U+0041 41 0041
U+20AC E2 82 AC 20AC
😀 U+1F600 F0 9F 98 80 D83D DE00

Neither UTF-8 nor UTF-16 changes the underlying Unicode identity of a character. They are different methods for representing that code point in stored or transmitted data.

UTF-16 vs Unicode Code Points

A Unicode code point identifies an abstract character, while a UTF-16 code unit is part of one particular encoding representation. This difference becomes particularly important for supplementary characters.

😀 Unicode code point: U+1F600 UTF-16: D83D DE00 One Unicode code point Two UTF-16 code units

It is therefore incorrect to assume that every Unicode character always corresponds to exactly one UTF-16 code unit.

Character Count, Code Point Count and UTF-16 Length

Text length can be measured in several different ways. A string may be described by its visual characters, Unicode code points, UTF-16 code units or encoded bytes. These counts can differ.

Text: A😀 Unicode code points: 2 UTF-16 code units: 3 UTF-16 bytes: 6 A: 1 code unit 😀: 2 code units

This difference is especially important in programming environments that expose string length in UTF-16 code units.

Common Uses for a UTF-16 Encoder Decoder

UTF-16 conversion is useful when inspecting Windows-oriented text data, binary file formats, network protocols, application memory, database values and APIs that expose UTF-16 code units.

Developers may also use the converter to troubleshoot endianness problems, verify BOM values, study surrogate pairs, compare UTF-8 and UTF-16 representations or inspect hexadecimal dumps containing Unicode text.

Typical technical uses

Typical scenarios include reverse engineering binary structures, checking UTF-16LE strings, decoding UTF-16BE payloads, debugging interoperability between systems, validating supplementary-plane characters and teaching how Unicode surrogate pairs operate.

Common UTF-16 Encoding Mistakes

A common mistake is forgetting that UTF-16 has a byte-order requirement. The code unit 20AC can appear as AC 20 in little-endian form or 20 AC in big-endian form.

Another mistake is assuming that every character occupies exactly two bytes. Characters above U+FFFF require a surrogate pair and therefore occupy four UTF-16 bytes.

It is also important not to interpret isolated surrogate code units as ordinary Unicode characters. A high surrogate must be followed by a valid low surrogate, and a low surrogate must belong to a corresponding high surrogate.

UTF-16 Encoder Decoder Limitations and Notes

The converter works with Unicode code points and UTF-16 code units. Some visual symbols can consist of multiple Unicode code points, such as emoji sequences containing variation selectors, skin-tone modifiers or zero-width joiners.

The tool does not perform Unicode normalization. Text is encoded according to the exact Unicode code points supplied, which is useful when comparing raw encoded representations.

When decoding data without a BOM, you must specify the correct endian order. Choosing the wrong order can produce unrelated Unicode code points or invalid surrogate sequences.

UTF-16 Encoder Decoder FAQs

What is a UTF-16 encoder?
A UTF-16 encoder converts Unicode code points into one or two 16-bit UTF-16 code units and then stores those units as bytes using little-endian or big-endian byte order.
What is a UTF-16 decoder?
A UTF-16 decoder reads 16-bit UTF-16 code units from a byte sequence and reconstructs the Unicode text represented by those units.
What is UTF-16LE?
UTF-16LE is UTF-16 stored using little-endian byte order, meaning the least significant byte of each 16-bit code unit appears first.
What is UTF-16BE?
UTF-16BE stores the most significant byte of each 16-bit UTF-16 code unit first.
What is A in UTF-16?
The letter A is Unicode U+0041 and uses UTF-16 code unit 0041. UTF-16LE stores it as 41 00 and UTF-16BE stores it as 00 41.
What is € in UTF-16?
The euro sign U+20AC uses UTF-16 code unit 20AC. Its UTF-16LE bytes are AC 20 and its UTF-16BE bytes are 20 AC.
What is 😀 in UTF-16?
The grinning face U+1F600 requires surrogate pair D83D DE00. In UTF-16LE it is 3D D8 00 DE, while UTF-16BE stores it as D8 3D DE 00.
What is a UTF-16 surrogate pair?
A surrogate pair is a high-surrogate and low-surrogate code-unit pair used to represent Unicode code points from U+10000 through U+10FFFF.
Does every UTF-16 character use two bytes?
No. Many code points use one 16-bit code unit, or two bytes, but supplementary characters use two code units and therefore four bytes.
What is the UTF-16 BOM?
The UTF-16 Byte Order Mark is U+FEFF. Its byte representation is FF FE for UTF-16LE and FE FF for UTF-16BE.
Is a BOM required for UTF-16?
Not always. A BOM can identify byte order, but a protocol or file format may define UTF-16LE or UTF-16BE explicitly without including one.
Can I decode UTF-16 hexadecimal bytes?
Yes. Select Decode UTF-16 → Text, choose Hexadecimal and enter bytes such as 41 00 AC 20 for UTF-16LE.
Can I decode binary UTF-16 data?
Yes. Select Binary and enter eight-bit byte groups. The total number of bytes must be even because every UTF-16 code unit occupies two bytes.
Can UTF-16 represent every Unicode character?
Yes. UTF-16 represents Basic Multilingual Plane code points directly and supplementary code points using surrogate pairs.
Why can one Unicode character use two UTF-16 code units?
UTF-16 code units contain only 16 bits. Unicode code points above U+FFFF require a pair of reserved 16-bit surrogate values to represent the larger code point.
Does this converter validate invalid surrogate pairs?
Yes. Decode mode rejects isolated low surrogates, unmatched high surrogates and invalid surrogate-pair sequences rather than silently treating them as valid Unicode text.
Scroll to Top