Skip to main content
Byte Array Tools

Bytes to Integer / Float Converter

Interpret 1, 2, 4 or 8 bytes as signed and unsigned integers or as a float32 or float64, in both big-endian and little-endian order.

Paste the bytes you see in a hex dump or a packet capture to find out which number they encode.

Enter 1 to 8 bytes in hex, in the order they appear in memory or in the file. Every type that fits is shown, read both big-endian and little-endian.

The same four bytes can mean a large integer or a small decimal - you need to know the type and byte order the data was written with.

What Is the Bytes to Integer / Float Converter?

The same bytes mean different numbers depending on the type and the byte order they were written with. Enter 1, 2, 4 or 8 bytes in hex and this tool shows every standard interpretation at once: signed and unsigned integers from 8 to 64 bits, 32-bit float and 64-bit double, each read big-endian and little-endian.

When to Use It

  • Decoding a field in a binary file format, a sensor reading or a Modbus register.
  • Checking a value in a hex dump or a Wireshark capture.
  • Understanding IEEE 754 floating-point bytes.

How to Use It

  1. Enter the bytes in hex, in the order they appear in memory or in the file.
  2. Read the table - pick the row for the type you expect and the column for the byte order.

Example

The four bytes 40 49 0F DB read as a big-endian float32 are 3.1415927410125732 - the nearest float to pi. The same bytes as a big-endian int32 are 1078530011. The eight bytes 40 09 21 FB 54 44 2D 18 as a big-endian double are 3.141592653589793.

Understanding the Output

Only types whose size matches the number of bytes are shown: 4 bytes give int32, uint32 and float32. When one column shows a sensible number and the other a huge or tiny one, the sensible column is almost always the right byte order.

Limitations

Three, five, six or seven bytes do not match a standard type. Fixed-point, BCD and half-precision (16-bit) floats are not decoded. For the reverse direction, use Integer to Bytes; to just swap the order, use the Endianness Converter.

Frequently Asked Questions

You need to know the type the data was written with, usually from the file format or protocol specification. If you are unsure, look for the row and byte order that gives a sensible value - wrong interpretations usually give huge or tiny numbers.

Each type has a fixed size: 1 byte for int8, 2 for int16, 4 for int32 and float32, 8 for int64 and double. The table shows the types that match the number of bytes you entered.

IEEE 754, the standard used by virtually all modern processors and languages: float32 (single precision) for 4 bytes and float64 (double precision) for 8 bytes.
Share this tool: