Number Utilities

Reverse Hex Bytes

Reverse the order of complete hexadecimal bytes. Each two-digit byte keeps its digits in the original order.

✓ Every tool runs in your browser. We do not upload your input or output.

Reverse Hex Bytes
Keyboard shortcuts

Ctrl/⌘ + Enter: process

Ctrl/⌘ + Shift + F: full screen

Esc: exit full screen

Ctrl/⌘ + F in editor: search

Reversed hex bytes
ReadyLines: 1 · Characters: 0 · Size: 0 KB · Time: — · Cursor: 1:1

How to use

  1. Paste an even-length hex string, optionally prefixed with 0x or spaced between bytes.
  2. Run the tool and read the bytes in reverse order.
  3. Compare with the byte order required by your binary protocol.
  4. Copy the result, preserving or removing spaces as needed by the destination.

Examples

Inspect a 32-bit value

The byte order changes; each two-digit byte remains intact.

Input
01 23 45 67
Output
67 45 23 01

Change byte order precisely

A hexadecimal string is often used to display binary bytes. When a protocol changes between big-endian and little-endian order, the bytes may need to appear in reverse sequence. Enter 01 23 45 67 and this tool returns 67 45 23 01. The digits inside a byte are not swapped. That distinction matters: reversing every character would produce a different value.

The tool accepts plain hex, a leading 0x, and whitespace between bytes. It rejects odd numbers of digits because a half-byte cannot be reversed as a complete byte. The result uses lowercase digits with spaces between bytes for readability. Check the receiving format before pasting it into source code; some APIs expect an uninterrupted string.

Reversing bytes is only one part of interpreting an integer. Signedness, word width, and field boundaries also matter. Do not reverse a whole packet when only one field uses a different byte order. This tool performs a local text transformation and does not upload the input. Use the Number Base Converter if you instead need the numeric value in another base.

Frequently asked questions

Does it reverse individual hex digits?

No. It reverses two-digit bytes, so 12 34 becomes 34 12.

Can I enter a 0x prefix?

Yes. One leading 0x or 0X is accepted.

Why must the number of digits be even?

A complete byte requires exactly two hexadecimal digits.

Is this always an endian conversion?

Only when the source and destination interpret these bytes as the same multi-byte value in opposite byte orders.

Related tools