Big Endian to Little Endian Binary Converter
Convert binary strings between Big and Little Endian byte orders. Supports 16-bit, 32-bit, and 64-bit word boundaries with automatic padding and hex previews.
About
Endianness defines the sequential order in which bytes are arranged into larger numerical values in computer memory. Mismatched byte architectures present a critical data corruption risk. When a protocol transmitting in Network Byte Order (Big Endian) interfaces with an x86 host processor (Little Endian) without explicit byte-swapping, the numerical value is interpreted with catastrophic offsets. For example, a 32-bit integer transmitted as 00 00 00 01 (value 1) processed without conversion becomes 01 00 00 00 (value 16777216).
This tool strictly performs byte-level reflection within defined hardware word boundaries (16-bit, 32-bit, or 64-bit). It processes raw binary strings, pads them to the nearest valid word alignment, and reverses the octet sequence inside each word. It does not alter bit-endianness, adhering to standard POSIX and IEEE protocol behaviors for cross-platform data serialization.
Formulas
Endian conversion operates on the byte (octet) level, not the bit level. The mapping of bytes B within a word of size W (where N is the number of bytes) follows the index permutation:
For a 32-bit (4-byte) word, the Big Endian to Little Endian transformation matrix is visually mapped as:
Reference Data
| Architecture / Protocol | Default Endianness | 32-bit Example (Hex) | Memory Layout (Increasing Address →) |
|---|---|---|---|
| x86, x86-64 (Intel, AMD) | Little Endian | 0x12345678 | 78 56 34 12 |
| TCP/IP (Network Byte Order) | Big Endian | 0x12345678 | 12 34 56 78 |
| ARMv7 / ARMv8 | Bi-Endian (Default Little) | 0x12345678 | 78 56 34 12 |
| Motorola 68000 / PowerPC | Big Endian | 0x12345678 | 12 34 56 78 |
| WAV / AVI Files (RIFF) | Little Endian | 0x12345678 | 78 56 34 12 |
| JPEG / PNG Files | Big Endian | 0x12345678 | 12 34 56 78 |
| WebAssembly (WASM) | Little Endian | 0x12345678 | 78 56 34 12 |
| Java Virtual Machine (JVM) | Big Endian | 0x12345678 | 12 34 56 78 |
| Bluetooth (HCI) | Little Endian | 0x12345678 | 78 56 34 12 |
| I2C Bus Protocol | Big Endian | 0x12345678 | 12 34 56 78 |