Bytes to Int Converter
Convert hex bytes to signed or unsigned integers using big-endian or little-endian byte order.
Paste bytes as spaced hex, comma-separated values, 0x-prefixed bytes, or compact hex.
Examples
Unsigned Integer
256Signed Integer
256Bit Width
32-bitHex Value
0x00000100Parsed Bytes
00 00 01 0000000000000000000000000100000000Big-endian vs little-endian
Big-endian reads the first byte as the most significant byte. Little-endian reads the first byte as the least significant byte. The same bytes can produce different integer values, so choose the byte order used by your file format, protocol, CPU, or API.
Code Examples
const bytes = [0x00, 0x00, 0x01, 0x00];
const value = bytes.reduce((n, byte) => (n << 8n) + BigInt(byte), 0n);
console.log(value.toString()); // 256Frequently Asked Questions
What is a bytes to int converter?
A bytes to int converter reads a sequence of byte values, combines them in a chosen byte order, and returns the resulting decimal integer.
What is big-endian byte order?
Big-endian stores the most significant byte first. For example, bytes 00 00 01 00 are interpreted as decimal 256 in big-endian order.
What is little-endian byte order?
Little-endian stores the least significant byte first. The same bytes 00 00 01 00 become decimal 65536 when read as little-endian.
Can I convert signed integers?
Yes. The converter shows both unsigned and signed results. The signed value interprets the highest bit as a two's-complement sign bit for the current byte width.
Related Tools
Byte Converter
Convert between bytes, bits, kilobytes, megabytes, gigabytes, binary units, and related byte tools.
Hexadecimal to Decimal Converter
Convert hexadecimal numbers to decimal (base 10) instantly.
Binary to Decimal Converter
Convert binary numbers to decimal (base 10) instantly.
Two's Complement Calculator
Calculate two's complement representation for signed integers.