Endianness Converter
Swap byte order between big-endian and little-endian for 16, 32 and 64-bit values, and see the numbers each order represents.
Enter a hex number or a run of bytes to reverse the byte order of each 16, 32 or 64-bit word.
0x12345678) or a run of bytes (78 56 34 12 EF BE AD DE). Bytes are swapped within each word.More Byte Array Tools
View all 17Network protocols use big-endian, while x86 and most ARM systems store numbers little-endian - mismatches are a classic source of wrong values.
What Is the Endianness Converter?
Endianness is the order in which a multi-byte number is stored. Big-endian puts the most significant byte first (12 34 56 78), which is how numbers are written and how network protocols send them. Little-endian puts it last (78 56 34 12), which is how x86 and most ARM processors store them in memory. This tool swaps the byte order of 16, 32 or 64-bit values.
When to Use It
- A value read from a file or a packet looks wildly wrong - often a sign the bytes were read in the wrong order.
- Converting between network byte order and host order by hand, as
htonl()andntohl()do in code. - Reading multi-byte fields in a hex dump.
How to Use It
- Enter a single hex number such as
0x12345678or a run of bytes. - Choose the word size: 16, 32 or 64 bits.
- Read the swapped bytes and the unsigned value of each word in both orders.
Example
The bytes 78 56 34 12 EF BE AD DE with 32-bit words are two words. Swapped, they become 12 34 56 78 (305419896) and DE AD BE EF (3735928559) - the values a little-endian machine meant when it wrote them.
Understanding the Output
Bytes are reversed within each word, never across words. A single hex number shorter than the word size is padded with zeros on the left first, so 0x1234 as a 32-bit word is 00 00 12 34.
Limitations
The input must be a whole number of words. Bits inside a byte are never reversed - endianness is about byte order only. To see signed integers and floating-point values for the same bytes, use Bytes to Integer / Float.
Frequently Asked Questions
Explore More Tools
Keep going with related categories and our most used tools.