Binary Endianness Converter
Convert binary or hexadecimal data between big-endian and little-endian byte order. Reverse complete bytes, inspect the byte mapping and compare the numeric interpretation of the same byte sequence.
| Original Position | Original Byte | Hex | New Position | Converted Byte |
|---|---|---|---|---|
| Enter data and convert to view byte mapping. | ||||
What Is Endianness?
Endianness describes the order in which the bytes of a multi-byte value are arranged in memory, files, protocols or data streams.
The two most common byte orders are big-endian and little-endian. The individual bits inside each byte are not reversed when converting between these two byte orders.
Big Endian vs Little Endian
Big Endian
The most significant byte appears first.
0x12345678
Big-endian bytes:
12 34 56 78
Little Endian
The least significant byte appears first.
0x12345678
Little-endian bytes:
78 56 34 12
Binary Endianness Example
Consider this 32-bit big-endian binary byte sequence:
Hex bytes:
12 34 56 78
To convert it to little-endian, reverse the order of the four bytes:
Hex:
78 56 34 12
Notice that each eight-bit byte remains unchanged. Only the position of the bytes changes.
Endianness Is Not Bit Reversal
A common mistake is to reverse every individual bit when converting endianness. Standard byte-order conversion does not do that.
| Operation | Input | Output |
|---|---|---|
| Endian byte swap | 12 34 56 78 | 78 56 34 12 |
| Bit reversal | 00010010 | 01001000 |
| Byte internal bits | 00010010 | Remain 00010010 during endian swap |
16-Bit Endianness Conversion
12 34
Binary:
00010010 00110100
Little endian:
34 12
Binary:
00110100 00010010
32-Bit Endianness Conversion
DE AD BE EF
Little endian:
EF BE AD DE
The calculator works the same way for three-byte, four-byte, six-byte and eight-byte sequences. Every complete byte is preserved and the byte sequence is reversed.
64-Bit Endianness Conversion
01 23 45 67 89 AB CD EF
Little endian:
EF CD AB 89 67 45 23 01
The calculator supports byte sequences through 64 bits while preserving the exact integer value calculations with browser BigInt arithmetic.
Binary and Hexadecimal Input
Binary Input
Enter complete 8-bit bytes. Spaces are optional.
or
0001001000110100
Hexadecimal Input
Enter complete hexadecimal bytes. Spaces are optional.
or
12345678
Byte Order Reference Table
| Bit Width | Bytes | Big Endian | Little Endian |
|---|---|---|---|
| 8-bit | 1 | AB | AB |
| 16-bit | 2 | 12 34 | 34 12 |
| 24-bit | 3 | 12 34 56 | 56 34 12 |
| 32-bit | 4 | 12 34 56 78 | 78 56 34 12 |
| 48-bit | 6 | 01 23 45 67 89 AB | AB 89 67 45 23 01 |
| 64-bit | 8 | 01 23 45 67 89 AB CD EF | EF CD AB 89 67 45 23 01 |
How Numeric Interpretation Changes
The same physical byte sequence can represent different unsigned integers depending on which byte order is assumed.
12 34
Big-endian interpretation:
0x1234
4660 decimal
Little-endian interpretation:
0x3412
13330 decimal
This calculator therefore displays both big-endian and little-endian unsigned interpretations of the entered byte sequence.
Where Endianness Matters
Computer Memory
Processor architectures define how multi-byte numeric values are stored in memory.
Network Protocols
Many network protocols specify big-endian byte order, traditionally called network byte order.
Binary File Formats
File specifications may define integer fields using either little-endian or big-endian encoding.
Embedded Systems
Byte-order conversions are often required when exchanging data between processors, peripherals and communication interfaces.
Important Endianness Notes
It reverses the order of complete 8-bit bytes. It does not reverse the bit order inside each byte.
Binary input must contain a multiple of 8 bits.
Hexadecimal input must contain a multiple of two hexadecimal digits.
A one-byte value has identical big-endian and little-endian representations because there is only one byte to arrange.
The displayed decimal interpretations are unsigned integer interpretations of the byte sequence.
Endianness and bit numbering are related concepts in low-level computing, but they are not the same thing.