Reverse Hex Byte Order (Endian Converter)

Paste a hex value to reverse its byte order, converting between big-endian and little-endian. Bytes are swapped as pairs of digits, so 12345678 becomes 78563412, not 87654321.

A 0x prefix, spaces, colons and \x escapes are all fine.

Reversed byte order
Result appears as you type

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 positionByteNew position
0123
1342
2561
3780

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 positionByteNew position
0DE3
1AD2
2BE1
3EF0

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.

Related tools

Local Processing
End-to-End Encryption
Works Offline

Building Something Beyond This Tool?

We help teams design and build reliable web and mobile applications backed by well-structured APIs.