Free Number Base Converter

Convert between binary, decimal, hexadecimal and octal — type in any field and all others update instantly.

Number base conversion is fundamental in computer science, electronics and programming. Binary (base 2) is how computers process data, hexadecimal (base 16) is used for memory addresses, colour codes and bytecode, and octal (base 8) appears in Unix file permissions. Type in any field and all other bases update instantly. The bit breakdown visualises the binary structure of your number.

Click any field result to copy to clipboard.

Binary bit breakdown

Quick Reference

DecimalBinaryHexOctal
0000000
81000810
101010A12
151111F17
16100001020
321000002040
64100000040100
1281000000080200
25511111111FF377

Number Bases Explained

Decimal (base 10) is what we use daily — digits 0-9. Binary (base 2) uses only 0 and 1, the language computers operate in. Hexadecimal (base 16) uses 0-9 and A-F — widely used in programming, memory addresses and web colour codes (#FF5733). Octal (base 8) uses digits 0-7, still used in Unix file permissions.

Understanding number bases is essential in computer science, low-level programming, digital electronics and cryptography. A single byte (8 bits) can hold values from 0 (00000000) to 255 (11111111) in binary, or 0x00 to 0xFF in hex.

Why Hexadecimal Exists, and Where Each Base Appears

A positional numeral system encodes a value as digits multiplied by powers of its base. In decimal, 254 means 2×10² + 5×10¹ + 4×10⁰. In binary the same value is 11111110, and in hexadecimal it is FE. Nothing about the quantity changes — only the notation.

Binary is fundamental because a transistor is either conducting or not, giving two states and therefore base 2. But binary is unreadable in bulk: a single 32-bit value is a 32-character string of ones and zeros that no one can check by eye. Hexadecimal solves this through an exact relationship — 16 is 2⁴, so every hex digit corresponds to precisely four binary digits, with no rounding or ambiguity. One byte is always exactly two hex digits. This is why memory addresses, colour codes, hashes and byte dumps are written in hex: it is binary at a quarter of the length, and converting between the two is mechanical rather than arithmetic.

You meet each base in predictable places. Hex appears in CSS colours (#FF8800 is three bytes: red 255, green 136, blue 0), MAC addresses, memory addresses, and any checksum or hash. Binary shows up in permission bits, bitmask flags and network subnet masks. Octal — base 8, three bits per digit — survives almost exclusively in Unix file permissions, where chmod 755 encodes three groups of three permission bits.

Two details cause most confusion. Bit width is not implied by the value: 255 is 11111111 in 8 bits and 0000000011111111 in 16, the same number with different padding, which matters when a protocol specifies a field size. And negative numbers are normally stored in two's complement, where the leading bit indicates sign and −1 in 8 bits is 11111111 — indistinguishable from 255 unless you already know how the value is meant to be interpreted.

Frequently Asked Questions

Type the binary number in the Binary field and the decimal result appears immediately. You can also multiply each bit by its positional power of 2 and sum them: 1010 = 1×8 + 0×4 + 1×2 + 0×1 = 10.
0xFF = 255 in decimal. F in hex = 15. FF = (15 × 16) + 15 = 255.
11111111 in binary = 255 in decimal = FF in hexadecimal = 377 in octal. It is the maximum value of a single byte.
Hex is used because it directly maps to binary (1 hex digit = 4 bits), is more compact, and easier for humans to read than long binary strings. Memory addresses, CSS colours and bytecode are typically written in hex.
The converter uses JavaScript BigInt which supports arbitrarily large integers — no practical limit for everyday use.
Hex maps directly to binary (one hex digit equals four bits), making it compact and human-readable for values like memory addresses, colour codes (#FF5733) and bytecode.