Powered by NumberTally Tools · free calculators
NumberTally ToolsNumberTally Tools

Hex Calculator

Convert hexadecimal to decimal and decimal to hexadecimal instantly. Handles A–F digits of any length, shows the binary equivalent, and previews the RGB color your hex value makes. Results update instantly. Free, no sign-up.

Advanced options

How Hexadecimal Works

Hexadecimal is base 16. After 0–9 it uses the letters A–F for the values ten through fifteen. Each hex digit maps exactly to four binary bits, which is why programmers love it: the 8-bit byte 11111111 is just FF, and a memory address like 0x7FFF stays short and readable.

To convert by hand, multiply each digit by its place value (…, 256, 16, 1) and add: FF = 15 × 16 + 15 × 1 = 255. The nibble table below shows each digit's 4-bit pattern so you can see the binary hiding inside the hex.

Hex Colors on the Web

Every color on a web page is three hex bytes: red, green, blue. #FF0000 is pure red, #00FF00 pure green, #0000FF pure blue. Type any 6-digit hex value above and the color preview shows you exactly what it looks like — a handy way to explore the 16.7 million colors hex can express.

Frequently Asked Questions

How do I convert hex to decimal?

Multiply each digit by 16^position (from the right, starting at 0) and add. FF = 15×16 + 15 = 255.

What digits are valid in hexadecimal?

0–9 and A–F (case-insensitive). Anything else, like G or Z, is invalid.

Why is hex used in programming?

One hex digit is exactly 4 bits (a nibble), so bytes, memory addresses, and color codes stay compact and aligned.

What does the 0x prefix mean?

It is just a label meaning "what follows is hexadecimal" — 0xFF and FF are the same value, 255.

How are hex colors read?

Six hex digits split into three pairs: RRGGBB. #FF8800 is full red, half green, no blue — a bright orange.