How byte order reversal works
A byte is two hex digits, so first split the value into pairs: 12 34 56 78. Then write the pairs in the opposite order: 78 56 34 12. The digits inside each pair stay as they are.
Big-endian stores the most significant byte first, the way we write numbers. Little-endian, used by x86 and most ARM processors, stores the least significant byte first. Reversing the bytes converts one to the other.
Example 1: 0x12345678 → 78563412
Split into bytes, then reverse their order
Two hex digits make one byte. Reversing the byte order (not the individual digits) converts between big-endian and little-endian, so 12 34 56 78 becomes 78 56 34 12.
| Byte position | Byte | New position |
|---|---|---|
| 0 | 12 | 3 |
| 1 | 34 | 2 |
| 2 | 56 | 1 |
| 3 | 78 | 0 |
12 34 56 78 → 78 56 34 12
Example 2: DE AD BE EF → EFBEADDE
Split into bytes, then reverse their order
Two hex digits make one byte. Reversing the byte order (not the individual digits) converts between big-endian and little-endian, so 12 34 56 78 becomes 78 56 34 12.
| Byte position | Byte | New position |
|---|---|---|
| 0 | DE | 3 |
| 1 | AD | 2 |
| 2 | BE | 1 |
| 3 | EF | 0 |
DE AD BE EF → EF BE AD DE
Where this comes up
- Reading a 32-bit or 64-bit value from a hex dump or memory view on a little-endian machine.
- Bitcoin and other blockchains, where transaction and block hashes are displayed in the reverse byte order to the one used internally.
- Network protocols, which send numbers big-endian (network byte order), and file formats such as BMP and WAV, which store them little-endian.
Frequently asked questions
Why is this different from reversing the string?
Reversing the string would also swap the two digits inside each byte, turning 12 into 21, which is a different byte. Endianness is about the order of whole bytes, so each pair of digits is kept together.
What if my hex has an odd number of digits?
A leading 0 is added so the value splits into whole bytes. 123 is treated as 01 23, which reverses to 23 01.
What do the big-endian and little-endian readings show?
For values up to 8 bytes, the tool shows the unsigned number you get if the bytes are read in each order. This tells you which reading gives a sensible value, for example a length or timestamp.
Is my data sent anywhere?
No. The conversion runs in your browser and nothing you paste is uploaded.