Ambimat GroupAmbimatAmbiSecureSIMAuthAmbiAutomationEngineering BlogAhmedabad · India · Est. 1982
Encoding utility

Endian converter for byte order

Take a hex stream, group it by chosen width (u16 / u32 / u64), and see big-endian and little-endian renderings side by side, plus the unsigned numeric value of each. Crucial when reading length fields, TLV lengths, or numeric IDs in mixed-endian protocol stacks.

Client-sideu16 / u32 / u64

How to use this tool

What it does

Groups a hex stream by width (u16/u32/u64) and renders big-endian and little-endian side by side, with the unsigned value of each word.

When to use it

Use it when a field looks byte-swapped — reading a little-endian length or counter from a protocol that mixes byte orders, or reconciling host and network order.

Worked example

Paste 0A0B0C0D as u32: big-endian reads 0x0A0B0C0D, little-endian reads 0x0D0C0B0A.

Input

Result

Type something to convert.
All conversion runs locally.

About endianness

Big-endian writes the most-significant byte first. Little-endian writes the least-significant byte first. Smart-card / banking / network protocols typically use BE; x86, ARM, and most file formats use LE. Mixing them is a common source of bugs.

Spec

RFC 1700 (legacy network byte order).

Companion tool

Need length-field formats?

Length-field encoder →

Smart-card hint

ATR / APDU length encodings are BE.

APDU parser →

Frequently asked questions

What is the difference between big and little endian?

Byte order within a multi-byte integer. Big-endian stores the most significant byte first, which is how network protocols and most card specifications write values; little-endian reverses it, which is what x86 and ARM use in memory.

Which order do smart-card specifications use?

Big-endian almost universally — ISO 7816, EMV and ASN.1 all write the most significant byte first. DESFire is the notable exception, using little-endian for several of its native fields.

Does endianness affect a byte array?

No. It only matters when a sequence of bytes is interpreted as a number. A hash, a key or a certificate is a byte string and must never be byte-swapped.

Why does my value look wrong by orders of magnitude?

Almost always the wrong width rather than the wrong order — reading a u16 as a u32 pulls in two adjacent bytes. Check the field length before suspecting endianness.

Does anything I paste leave my browser?

Nothing. The tool is entirely client-side: the page ships a static script, does no network calls, and never transmits what you paste. You can confirm it by opening the network tab, or by loading the page and then going offline.