Little-Endian Hex to Decimal Converter

Little-Endian Hex to Decimal Converter. Paste your bytes into Hex Input (little-endian bytes) and the Little-Endian Hex to Decimal Converter instantly returns the correct Decimal Output. The date to hex converter converts your chosen date and time into its Unix timestamp, then displays it in hexadecimal.

Paste the bytes exactly as your debugger shows them and this little-endian hex to decimal converter hands back the real integer, with no mental flipping required. A multibyte hexadecimal value copied from memory dumps, a firmware image or one of many binary file formats looks wrong until its byte order is reversed, and decoding it by hand is where many embedded systems bugs begin. This guide gives every developer the rule, the maths and one fully worked case: 9C 4B 0F 00 is 1,002,396 in decimal.

What Is Little Endian Byte Order?

Little endian is a byte-ordering rule: the processor stores the least significant byte (LSB) at the lowest memory address, so the small end of the number comes first. The opposite rule, big endian, writes the most significant byte first, the way people write digits on paper. The property is called endianness, and it only matters once a number spans more than one byte, because a single byte has no order to argue about. Computing hardware picked sides decades ago, and both conventions are still in daily use, so any low-level tool has to handle the byte order explicitly. Byte significance is the whole story: the same bytes read in the opposite direction describe another number. The fastest way to see what a message looks like in binary is the text to binary converter, which converts each character in order.

Why the Least Significant Byte Comes First

Storing the least significant byte first lets a processor start adding at the lowest address and carry upward without knowing how long the number is. That is why the common desktop and mobile architecture families settled on it, and why data written by them keeps that layout when it is saved to a file or sent on a wire. It is also why a dump shows 9C 4B 0F 00 for 1,002,396, and why the converter has to reverse the bytes before it converts to decimal.

Big Endian vs Little Endian at a Glance

The same 32-bit number, 1,002,396, is laid out differently depending on the rule. Reading it with the wrong rule gives a completely different value.

Big Endian vs Little Endian at a Glance
RuleBytes as storedHow to read themCalculation result
Little endian9C 4B 0F 00Reverse to 00 0F 4B 9C1,002,396
Big endian00 0F 4B 9CRead as written1,002,396
Wrong rule applied9C 4B 0F 00Read as written2,622,164,736

How Little Endian Conversion Turns Hex Into Decimal

The little endian conversion is two small jobs in a row: put the bytes back in reading order, then convert the resulting hexadecimal number to decimal. Follow these steps with any byte string:

  1. Write the hex bytes in the order they are stored, for example 9C 4B 0F 00.
  2. Reverse the byte sequence, keeping each pair of hex digits together: 00 0F 4B 9C.
  3. Join the pairs into one big-endian hex number, 0x000F4B9C, a base 16 value.
  4. Multiply every hex digit by its power of 16, add the products, and read the answer in base 10.

Written as a formula, each stored byte \(b_i\) is weighted by 256 raised to its position, counted from the first stored byte:

$$N = \sum_{i=0}^{n-1} b_i \times 256^{i}$$

Because 256 is 16 squared, this is identical to the digit-by-digit power of 16 method taught for any hexadecimal number. Reversing the bytes first is only a shortcut for assigning the right weights.

Diagram of the stored bytes 9C 4B 0F 00 being reversed into reading order 00 0F 4B 9C to give 1,002,396 in decimal
Reversing the stored bytes turns 9C 4B 0F 00 into 0x000F4B9C, which is 1,002,396.

Little Endian Hex to Decimal Example Step by Step

A hex to decimal little endian conversion is easiest to follow on real bytes. Take the four stored bytes 9C 4B 0F 00. Each one is converted to decimal first, then multiplied by its place value, and the four products are added:

Little Endian Hex to Decimal Example Step by Step
PositionStored byte (hex)Byte in decimalPlace valueContribution
09C1562560 = 1156
14B752561 = 25619,200
20F152562 = 65,536983,040
30002563 = 16,777,2160

Adding the column gives \(156 + 19{,}200 + 983{,}040 + 0 = 1{,}002{,}396\). The reversed number checks out the other way as well: \(15 \times 16^{4} + 4 \times 16^{3} + 11 \times 16^{2} + 156 = 1{,}002{,}396\), where the last term folds the final byte 9C into a single value of 156.

Waterfall chart of bytes 9C, 4B and 0F contributing 156, 19,200 and 983,040 to a decimal total of 1,002,396
Each stored byte is weighted by a power of 256; the third byte supplies almost the whole total.

What Happens If You Read It as Big Endian

Skip the reversal and treat 9C 4B 0F 00 as 0x9C4B0F00 and you get 2,622,164,736, more than 2,600 times too large. A value that size usually trips a range check somewhere downstream, which is a helpful symptom: an absurdly large length or offset in parsed data is often a byte-order mistake rather than corruption.

Dumbbell chart comparing the correct little endian value 1,002,396 with the wrongly read big endian value 2,622,164,736
Reading the same four bytes in the wrong byte order inflates the value about 2,600 times.

Checking a BMP Header with a Hex to Decimal Little Endian Converter

A technician has a screenshot that downloaded from a lab instrument, and the viewer refuses to open it. On disk the file is 598,912 bytes. Opening it in a hex viewer, the first bytes read 42 4D 7A 3F 09 00 00 00. The 42 4D is the "BM" signature, and the BMP specification says bytes 2 to 5 hold the file size as an unsigned 32-bit integer, stored least significant byte first.

So the technician copies 7A 3F 09 00 into the converter, selects 32-bit and unsigned, and presses convert. The tool reverses the bytes to 00 09 3F 7A and returns 606,074. That is the size the instrument claimed when it wrote the header.

  • Header says: 606,074 bytes
  • File on disk: 598,912 bytes
  • Difference: 7,162 bytes missing

The comparison settles it. A standard 24-bit BMP carries a 54-byte header, so the header is promising 606,020 bytes of pixel data, and the last 7,162 of them never arrived. The file is a truncated transfer, not a corrupt format, which means the viewer is right to refuse it and no amount of header editing will help.

The technician's next step is specific: re-pull the screenshot over the instrument's second USB port and compare the new file size to 606,074 before opening it. Had the sizes matched, the next suspect would have been the pixel data itself. Reading the field with the wrong byte order would have produced 2,050,951,424, a number so far beyond any plausible screenshot that it would have pointed at the reading, not the file.

Signed and Unsigned Little Endian Hex Values

Reversing the bytes tells you the bit pattern; whether it means a positive count or a negative reading depends on the type. A good converter lets you choose signed or unsigned output for 8, 16, 32 and 64-bit widths.

Signed Integers and Two's Complement

Signed integers use two's complement: when the top bit of the most significant byte is set, subtract 2 raised to the bit width. Take the 16-bit pair 38 FF. Reversed it is 0xFF38, which is 65,336 as an unsigned integer. Its top bit is set, so as a signed integer the value is \(65{,}336 - 65{,}536 = -200\). The same two bytes, two honest answers, and only the data type tells you which one the sender meant.

Signed Integers and Two's Complement
WidthBytesUnsigned rangeSigned range
8-bit10 to 255-128 to 127
16-bit20 to 65,535-32,768 to 32,767
32-bit40 to 4,294,967,295-2,147,483,648 to 2,147,483,647
64-bit80 to 18,446,744,073,709,551,615-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807

In protocol documents these show up as UINT, UINT16 and INT16 style names; pick the matching type in the converter, because the reversed bytes are decoded as an integer. A float field is a separate decode.

Hex Input Rules for the Little-Endian Hex to Decimal Converter

This online hex converter expects whole bytes, two hex digits each, with the least significant byte first. Space-separated bytes and one continuous string both work, and multiple lines are accepted, so a pasted dump with several rows is fine. A dedicated hex converter like this saves you from reversing every row by eye.

Hex String Format and Odd-Length Input

An odd-length hex string is ambiguous, because it ends in half a byte, so it should be flagged or left-padded with a zero rather than silently guessed. Keep the hex input in stored order and let the tool do the reversal. If a field is shorter than the width you selected, padding with zero bytes at the high end, which in stored order means the end of the string, never changes the value: 9C 4B and 9C 4B 00 00 both give 19,356 as an unsigned integer.

Byte Length and Large Values

Pick the byte length that matches the field in the file or packet specification. A converter built on BigInt arithmetic keeps full precision for 64-bit values, which ordinary floating-point numbers cannot, and a copy result button saves retyping the answer into your notes. Any little endian converter you trust should also tell you which width it assumed, since you can get a different answer from the same bytes at 16 and 32 bits.

Where Little Endian Hex Shows Up in Real Systems

You meet this layout wherever raw bytes leave a processor. Typical places are:

  • Intel x86/x64 processors and ARM cores in their default mode, which store integers little endian.
  • Network protocols and binary protocols for device communication, including USB descriptors, I²C and SPI sensor registers, CAN frames, UART packets and BLE characteristics.
  • Binary file formats such as BMP headers, ELF sections and WAV chunks, whose file specs state the byte order of every field.
  • Firmware images and microcontrollers whose registers are read back as byte arrays.
  • Debugging sessions where memory addresses and pointers appear in a hex view.
  • Reverse engineering, data recovery and protocol analysis, where raw binary data has to be decoded without any documentation.
  • IoT and industrial sensor data, where sensors report through a gateway that forwards each reading as a short hex payload.

Struct parsing does this in code, and this converter is a quick way to check what the parser should return.

Related Hex to Decimal Calculator and Converter Tools

A plain hex to decimal conversion, with no byte reversal, belongs to the wider family of numeral systems; the standard hexadecimal to decimal method applies once the bytes are in reading order,, and the neighbouring calculators answer questions this page does not:

  • A hex to binary converter shows the individual bits and bytes behind a value, useful when a flag field packs several settings into one byte.
  • A decimal to hex converter, and its decimal to hex little endian counterpart, runs the conversion backwards when you need to build a payload.
  • A hex bitwise calculator applies AND, OR and shift operations once the integer is decoded.
  • A combined hex & little endian converter, such as the little endian hex to decimal converter you are using now, handles reversal and base change in one step.
  • An ASCII table helps when the same bytes might be text rather than a number.

Used together, they cover the full path from raw bytes to a meaningful decimal value, and back again.