Number Base Converter

Convert between decimal, hexadecimal, binary, and octal instantly. Type in any base.

Decimal
Base 10
Hexadecimal
Base 16
0x
Binary
Base 2
0b
Octal
Base 8
0o
Quick Reference — click any row to load
DecimalHexBinaryOctalNote
0000
1111
88100010
10A101012hex A
15F111117hex F
161010000200x10
322010000040space
483011000060'0' ASCII
644010000001000x40
65411000001101'A' ASCII
97611100001141'a' ASCII
1277F1111111177DEL
12880100000002000x80
255FF111111113770xFF
2561001000000004000x100
10244001000000000020001 KB
409610001000000000000100004 KB
65535FFFF11111111111111111777770xFFFF

Frequently asked questions

What is hexadecimal and why is it used in programming?
Hexadecimal (base 16) uses digits 0–9 and letters A–F. Each hex digit represents exactly 4 binary bits (a nibble), making it a compact shorthand for binary. Programmers use it for memory addresses, color values (like #FF5733), bitfield masks, and low-level data where the underlying bit pattern matters. Two hex digits (00–FF) represent one byte.
How do I convert binary to decimal?
Multiply each binary digit by its positional power of 2, then sum them. For example, 1011 in binary = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1 = 11 in decimal. This converter does it instantly — just type the binary value in the Binary field.
What is octal used for?
Octal (base 8) is most commonly used for Unix file permissions. The command chmod 755 uses octal: 7 = rwx (read/write/execute), 5 = r-x (read/execute), so 755 = owner can do everything, group and others can read and execute. Each octal digit represents exactly 3 binary bits.
What does 0xFF mean?
0xFF is hexadecimal for 255 in decimal, or 11111111 in binary. It represents a byte with all 8 bits set to 1. It is commonly used as a bitmask to extract the lowest byte from a larger integer: value & 0xFF gives you the last 8 bits. In CSS colors, #FFFFFF means all three channels (R, G, B) are at maximum (255).
How do I convert hex to binary?
Each hexadecimal digit maps directly to exactly 4 binary bits: 0=0000, 1=0001, …, 9=1001, A=1010, B=1011, C=1100, D=1101, E=1110, F=1111. So 0xAF = 1010 1111 in binary. This makes hex a convenient shorthand for binary — just convert each digit individually.
What is two's complement / signed integers?
In signed 32-bit integers, the highest bit (bit 31) is the sign bit. If it is 1, the number is negative. The negative value is calculated as (unsigned value) − 2^32. For example, 0x80000000 = 2147483648 unsigned, but −2147483648 in signed 32-bit. This converter shows the signed interpretation when the 32-bit sign bit is set.