Hexadecimal to Decimal Converter

Convert hexadecimal to decimal for web colors and programming.

Result

1 hex = 1 dec

Results are provided for general informational purposes only. Always verify important calculations independently. Learn more

Conversion Formula

Convert each hex digit

Worked Example:

To convert HEX to DEC:

FF hex = 255 decimal

Common HEX to DEC Conversions

HEXDECHEXDEC
1 hex1 dec50 hex80 dec
2 hex2 dec75 hex117 dec
5 hex5 dec100 hex256 dec
10 hex16 dec250 hex592 dec
25 hex37 dec500 hex1280 dec

Frequently Asked Questions

When are different number bases used?

Binary (base 2) represents how computers store and process data internally. Hexadecimal (base 16) provides compact representation of binary data for programming, memory addresses, and color codes (#FF0000). Octal (base 8) is used for Unix file permissions (chmod 755). Decimal (base 10) is the human-readable standard for everyday numbers and final calculations.

How do you convert decimal to binary?

Repeatedly divide the decimal number by 2 and track remainders. Read remainders from bottom to top for the binary result. Example: 13 decimal → 13÷2=6 remainder 1, 6÷2=3 remainder 0, 3÷2=1 remainder 1, 1÷2=0 remainder 1 → reading upward: 1101 binary. Alternatively, find powers of 2: 13 = 8+4+1 = 2³+2²+2⁰ = 1101 binary.

Why does hexadecimal use letters A-F?

Hexadecimal needs 16 unique symbols for digits 0-15. Using 0-9 provides ten symbols, so letters A-F represent 10-15 (A=10, B=11, C=12, D=13, E=14, F=15). This allows each hex digit to represent exactly 4 binary bits: F(hex) = 15(decimal) = 1111(binary). Two hex digits (00-FF) perfectly represent a byte (8 bits, 0-255 decimal).

What is the relationship between hex and binary?

Each hexadecimal digit represents exactly 4 binary bits, making conversions easy. Hex F = binary 1111, hex A = binary 1010, hex 5 = binary 0101. To convert: group binary into sets of 4 bits (from right), then convert each group to hex. Example: 11010110 binary = 1101 0110 = D6 hex. This 4:1 relationship makes hex perfect for representing binary data compactly.

How do programmers use different number bases?

Programmers use hex for memory addresses (0x2AF3), color codes (#FF5733), and byte values. Binary for bitwise operations, flags, and masks (checking if bit 3 is set). Octal occasionally for file permissions (chmod 644). Decimal for human-readable values and arithmetic. Most programming languages support literals: 0xFF (hex), 0b1010 (binary), 0o755 (octal), or simply 255 (decimal).

Related Converters