Reverse Hex

Reverse the byte order of hex values to switch between little and big endian.

0 chars
0 words
0 lines
0 chars
0 words
0 lines

Reverse Hex – Byte Order Swapper

Reverse the byte order of hexadecimal values to convert between little-endian and big-endian. Paste one hex value per line and each line is reversed two digits at a time: 12345678 becomes 78563412 and DEADBEEF becomes EFBEADDE. Spaces, colons, and 0x prefixes in the input are ignored.

What is endianness?

Endianness describes the order in which the bytes of a multi-byte number are stored in memory or sent over a network. Big-endian stores the most significant byte first, the way we write numbers on paper. Little-endian stores the least significant byte first. x86, x64, and most ARM systems are little-endian, while network protocols such as TCP/IP use big-endian ("network byte order"). The 32-bit number 0x12345678 is therefore stored as 78 56 34 12 on a typical PC.

When you need to reverse hex

  • Reading memory dumps and hex editors – values from a little-endian machine appear "backwards".
  • Bitcoin and blockchain work – transaction and block hashes are displayed in reversed byte order compared with their internal representation.
  • Network and file formats – converting fields between network byte order and host order, or reading headers of BMP, WAV, and ZIP files, which are little-endian.
  • Linux /proc files – /proc/net/tcp shows IPv4 addresses such as 0100007F, which reversed is 7F000001 = 127.0.0.1.

Reversal units

Byte reversal is the most common, but you can also reverse 16-bit words (swap 1234 5678 to 5678 1234, useful for word-swapped Modbus registers), 32-bit dwords, or individual nibbles to mirror the whole string character by character. If a value has an odd number of digits, a leading zero is added so bytes stay aligned.

Output options

Choose a separator (none, space, colon, or comma), add a 0x prefix, and force uppercase. To convert the reversed value to decimal afterwards, use Hex to Decimal; to turn it into an IP address, use Hex to IP.

Frequently Asked Questions

Reverse the order of the bytes. Paste the hex value, keep 'Reverse by' on Byte, and the result is the same number in the other byte order. The operation works both ways.

Bitcoin computes hashes as byte arrays but displays them as little-endian numbers, so the hex shown in block explorers is byte-reversed compared with the raw hash bytes. Reversing the hex converts between the two forms.

A leading zero is added before reversing, so ABC is treated as 0ABC and becomes BC0A. This keeps every byte made of two digits.