Skip to content
100% local

Endianness converter

Swap a number or hex string between little-endian and big-endian byte order.

Input
Output

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.

FAQ

What is the difference between little-endian and big-endian?
Big-endian stores the most significant byte of a value first; little-endian stores the least significant byte first. This tool reverses the byte order between the two.
What does word size control?
Word size sets how many bytes make up one value — 2 bytes for 16-bit, 4 for 32-bit, 8 for 64-bit. A shorter input is padded with leading zero bytes to fill the word before it is swapped.
Can I convert a value from hex to decimal at the same time as swapping it?
Yes. Input format and output format are independent, so you can read a hex byte string in and get the swapped result as a decimal number, or any other combination.
What happens with an invalid or oversized value?
The tool shows a calm error naming the exact value that failed and, in batch mode, its line number — for example a value with a non-hex character, or a decimal number too large for the selected word size.
Is my data uploaded anywhere?
No. The conversion runs entirely in your browser using local JavaScript — nothing you enter is sent to a server.