Endianness converter
Swap a number or hex string between little-endian and big-endian byte order.
Endianness converter
Paste a hexadecimal, decimal or binary value and this tool reverses its byte order, converting between little-endian and big-endian representation. It is built for the moment a value read off the wire, out of a binary file, or from a register dump comes out backwards — a network protocol using big-endian on a little-endian machine, a hex dump that needs re-ordering, or a firmware constant that has to be checked against a datasheet.
Choose the input format (hexadecimal, decimal or binary) and the output format independently, so you can paste a hex byte string and read back the swapped value as a decimal integer, or the reverse. Word size sets how many bytes make up one value — 16-bit, 32-bit or 64-bit — which controls both the padding applied to a short value and the largest value the field accepts. Turn on batch mode to convert one value per line, useful for swapping a whole column of register values at once.
Input is validated as it is typed: a value with characters outside the chosen format, or one too large for the selected word size, produces a clear error naming the offending value (and its line number in batch mode) instead of a silent wrong answer. Hexadecimal accepts an optional 0x prefix and spaces between bytes; binary accepts an optional 0b prefix; both tolerate underscores as digit separators. Byte-swapping is its own inverse, so running a result back through the tool restores the original value.
Everything runs locally in your browser — nothing you paste here, including values copied from proprietary firmware or protocol dumps, is ever uploaded. Copy the result, download it as a .txt file, or send the output straight back into the input to keep working on it.