About the Reverse Hex
Two machines can store the same number and disagree about which end comes first. Big endian writes the most significant byte at the lowest address, little endian writes the least significant byte first, and x86 processors, most file formats produced on them and the majority of network protocols do not all agree. When a value read out of memory looks like nonsense, reversing its byte order is usually the fix, and because reversing twice returns the original, this page converts in both directions.
Reverse by byte is the common case: the digits are split into pairs and the pairs are reversed, so 1A2B3C4D becomes 4D3C2B1A. Nibble reverses single hex digits instead, which is what you want for a display that shifts one digit at a time. The 16-bit and 32-bit word modes reverse whole words while leaving the bytes inside each word alone, which matches how mixed endian formats and some DSP buffers are laid out.
Input can be written however you copied it. A 0x prefix, spaces, commas, colons, dots and dashes are all stripped before the digits are read, so a wireshark style 00:04:f1:a0 works as well as a bare run. Each line is treated separately, so a whole column of values converts in one pass. A string whose length is not a whole number of the chosen unit is rejected with a message telling you to pad it, because silently dropping a half byte would produce a wrong answer. Tick "Show both values" to print the big endian and little endian decimal readings side by side. To turn the bytes into text instead, open Hex Decode.
How to use
- Paste one hex string per line, with or without
0x, spaces or colons. - Choose the unit to reverse by: byte for endianness, nibble for single digits, or a word size for mixed endian data.
- Set the case and grouping to match the tool you are pasting into.
- Tick Show both values to see the decimal reading before and after the swap.
Common questions
- What is the difference between big endian and little endian?
- Big endian stores the most significant byte first, little endian stores the least significant byte first. Network protocols usually use big endian and x86 memory uses little endian.
- Why was my string rejected for having an odd length?
- A byte is two hex digits, so an odd count means a nibble is missing. Add a leading zero, or switch the unit to Nibble if you really meant single digits.
- Does reversing twice give me the original?
- Yes, for every unit size. The operation is its own inverse, which is why the same page handles both directions.
- Can I keep the colons my capture used?
- The separators are stripped on the way in. Choose Group digits every 2 to get a spaced output, then swap the spaces for colons in your editor.