All tools
TOOL IDB-SWE-006
Endianness swap

Desktop only

Engineering tools are available only on desktop screens.

Endianness swap

Byte-swap a value across width. Useful when crossing endianness boundaries (network vs ARM, BLE vs serial, file formats).

Memory layout value —
addr → BE network LE x86 / ARM ME word-swap
Engineering notes

Convention

  • Big-endian: high-order byte first. Network order, AVR / classic ARM compilers.
  • Little-endian: low-order byte first. Intel x86 / x64, most modern ARM, STM32.
  • BLE GATT typically little-endian for multi-byte characteristics.

Common usage

  • htons / htonl = host-to-network = LE→BE on most platforms.
  • Modbus is big-endian on the wire; some PLC vendors use word-swapped float (middle-endian).

Result

Live