UTF-16LE to Text Decoder

Paste UTF-16LE bytes as hex pairs and read the text they spell.

FluffyShield Protected workspace
FluffyShield

Isolated workspace: other page scripts can't read your files. How FluffyShield works

Free · No upload · No sign-up · No usage quotas

Why did your text decode as Chinese characters?

Probably because its bytes, the small numbers a file is stored as, were in the other order. UTF-16 writes characters in pairs of bytes, and not everyone puts each pair the same way round.

How the bytes are read
  1. Pair the bytes two by two
  2. Expect the 00 of each pair to come second
  3. Print the character each pair stands for

What it does

Spaces are optional

540065006100 reads exactly as the same pairs with spaces between them.

An odd byte stops it

Leave off the last byte and you get "UTF-16 requires an even number of bytes; each code unit contains two bytes."

Limits Plain hex pairs only: a 0x in front of each byte, or commas between them, stops it with a message.

Every other byte is 00

You're looking at a file's bytes written out as hex, from a hex viewer or a log, and there's a 00 in every second place: 54 00 65 00 61 00. That rhythm is the mark of UTF-16 holding plain English.

UTF-16 stores each character as a number in one pair of bytes, room for numbers up to 65,535, or in two pairs for the rarer ones above that, emoji among them. English letters have small numbers. T is 84, written 54 in hex, and it fits in one byte, so the other byte of its pair is 00. Which of the two goes first is the question this page turns on.

Big end first or little end first

Writing a date has the same problem. 03/04 is the 3rd of April in London and March the 4th in New York: the same digits, read in another order, give another day, and nothing about them tells you which was meant.

Computer people settled on the names in 1980, when Danny Cohen borrowed them from Gulliver's Travels, where the Lilliputians go to war over which end of an egg to crack. Big-endian puts the big end of the number first, 00 54 for T. Little-endian puts the little end first, 54 00. UTF-16LE is the little-endian kind, and it's the only kind this page reads.

00 second: little-endian540065006100Tea00 first: big-endian005400650061吀攀愀

Both byte orders

The same six bytes, paired the other way round. This page reads every pair with its 00 second, so only the top row gives Tea. How we checked

Give it big-endian bytes and it doesn't complain. It reads 00 54 as 54 00, the number 21,504, and in Unicode the numbers around there are Chinese characters. So a word turns into a short row of them, one for each letter. When your text comes out like that, the bytes almost certainly had their 00s first.

Reading your bytes as text

Copy the bytes from your hex viewer as they are. The other UTF-16 settings are in FluffyBench's Base encoder and decoder.

  1. Paste the hex pairs into the Input box.

  2. Find the words in the Text box; on a phone, switch to Result first.

    The Text box holding the word Tea, with Copy and Download above it.
    The Text box holding the word Tea, with Copy and Download above it.

If the Text box fills with Chinese characters you didn't expect, swap the bytes first with the UTF-16BE to UTF-16LE Converter, then paste its result here.

Bytes that aren't UTF-16LE

You want to see the number behind every character of a text

FluffyBench Unicode inspector

It lists each character as its number, U+0054 for T and so on, which is the quickest way to spot one that doesn't belong.

The hex has no 00s, and an é shows up as two bytes like C3 A9

Base encoder and decoder

That's UTF-8. Set From to Base16 and To to Text, and it reads the pairs that way.

Search FluffyBench