Endianness Converter
Swap byte order between big-endian and little-endian and read the same bytes as integers or IEEE 754 floats.
Enter a value to see its bytes the other way round. 12 34 56 78 read the other way round is 78 56 34 12
32-bit ยท 4 bytes ยท IEEE 754 binary32 ยท middle-endian (PDP-11): 34 12 78 56
How it works
Endianness is the order in which a multi-byte number is stored in memory. Big-endian puts the most significant byte first (network byte order, used by TCP/IP, Java and Motorola 68k); little-endian puts the least significant byte first (x86, x86-64 and ARM in its usual configuration). The same four bytes therefore mean two different numbers depending on which convention reads them, which is why a value that looks sane in a hex dump can arrive as nonsense over the wire.
Type a value and pick how it should be read: hex bytes (shorter input is zero-padded on
the left, so 0x1234 at 32 bits becomes 00 00 12 34), a decimal
integer (negatives are encoded as two's complement) or a decimal float. The table then
shows the same byte sequence read both ways: the bytes themselves, the combined hex word,
the unsigned and signed integer values, and the IEEE 754 floating-point value
(binary16 at 16 bits, binary32 at 32 bits, binary64 at 64 bits, per IEEE 754-2008).
Float entry needs a 32-bit or 64-bit width; binary16 values can still be decoded from hex.
For 32-bit values the summary line also shows the middle-endian (PDP-11) layout, where the
two 16-bit halves are swapped internally but kept in big-endian order. Everything is
computed in your browser with BigInt and DataView, so 64-bit
values stay exact and nothing you paste is uploaded.
Frequently asked questions
What is the difference between big-endian and little-endian?
Endianness is the order the bytes of a multi-byte number are stored in. Big-endian stores the most significant byte first, which is why it is also called network byte order and is used by TCP/IP, Java and Motorola 68k. Little-endian stores the least significant byte first and is what x86, x86-64 and ARM normally use. The four bytes 12 34 56 78 are 305419896 read big-endian and 2018915346 read little-endian, which is exactly the mismatch this converter shows side by side.
How do I convert a hex value to little-endian?
Reverse the order of the bytes, not the hex digits: 0x12345678 becomes 78 56 34 12, so the little-endian word is 0x78563412. Paste the value above, pick the width, and the swapped bytes appear instantly with a copy button. Hex shorter than the chosen width is zero-padded on the left, so 0x1234 at 32 bits is treated as 00 00 12 34.
Does it handle floats and 64-bit values correctly?
Yes. Floating-point values follow IEEE 754-2008 and are decoded as binary16 at 16 bits, binary32 at 32 bits and binary64 at 64 bits, so 1.0 encodes to 0x3F800000 as a single and 0.1 to 0x3DCCCCCD. Integers use BigInt with two's complement for negatives, so 64-bit values stay exact instead of losing precision above 2^53. Everything is computed in your browser and nothing you paste is uploaded.