Hex to Decimal
Hexadecimal (Base 16)
Decimal: 255
Binary: 11111111
Octal: 377
Decimal (Base 10)
Hex: FF
Binary: 11111111
Octal: 377
Binary (Base 2)
Decimal: 255
Hex: FF
Octal: 377
Octal (Base 8)
Decimal: 255
Hex: FF
Binary: 11111111
Common Values
| Dec | Hex | Bin | Oct |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 2 | 2 | 10 | 2 |
| 8 | 8 | 1000 | 10 |
| 10 | A | 1010 | 12 |
| 15 | F | 1111 | 17 |
| 16 | 10 | 10000 | 20 |
| 32 | 20 | 100000 | 40 |
| 64 | 40 | 1000000 | 100 |
| 127 | 7F | 1111111 | 177 |
| 128 | 80 | 10000000 | 200 |
| 255 | FF | 11111111 | 377 |
| 256 | 100 | 100000000 | 400 |
| 1024 | 400 | 10000000000 | 2000 |
Hexadecimal Digits
Base Prefixes
- 0x or 0X - Hexadecimal (e.g., 0xFF)
- 0b or 0B - Binary (e.g., 0b1010)
- 0o or 0 - Octal (e.g., 0o755 or 0755)
- No prefix - Decimal
About the Hex to Decimal
The Hex to Decimal tool converts numbers between number bases, most commonly translating hexadecimal (base 16) into the familiar decimal (base 10) system, and often back the other way along with binary and octal. Hexadecimal uses sixteen symbols — the digits 0 through 9 plus the letters A through F representing values 10 through 15 — making it a compact shorthand for the binary data computers actually store. This tool is a staple for programmers, web designers, and anyone decoding machine-level values.
Conversion to decimal works by positional weighting: each hex digit is multiplied by a power of 16 based on its position, and the products are summed. For example, the hex value 1A equals 1 times 16 plus 10 times 1, which is 26 in decimal. Going from decimal back to hex uses repeated division by 16, collecting the remainders from last to first. Hexadecimal is especially convenient because every single hex digit maps exactly to four binary bits, so it compresses long binary strings cleanly.
Real-world uses are everywhere in computing. Web colors are written as hex codes like FF8800, where pairs of digits encode red, green, and blue intensities — a use that overlaps with color-picker tools. Hex also appears in memory addresses, character encodings, MAC addresses, and assembly debugging. Converting to decimal makes those values human-friendly for arithmetic or comparison.
A practical tip: hex is sometimes prefixed with 0x (as in 0x1A) in source code to signal the base, so strip or ignore that prefix when entering a value. Keep in mind that letters are case-insensitive for value but conventions vary, and a single hex digit always represents exactly four bits, which is why byte values run from 00 to FF (0 to 255 in decimal).
Frequently asked questions
- What do the letters A through F mean in hexadecimal?
- They are single-symbol digits for the values 10 through 15, since base 16 needs sixteen distinct symbols and the ten decimal digits only cover 0 through 9.
- How is a hex number converted to decimal?
- Each digit is multiplied by a power of 16 according to its position, and the results are added together; for instance 1A equals 16 plus 10, which is 26.
- Why is hexadecimal used so much in computing?
- Each hex digit maps exactly to four binary bits, making it a compact, readable shorthand for binary data such as colors, memory addresses, and byte values.
- What does the 0x prefix mean?
- It is a programming convention indicating the number that follows is hexadecimal; the actual value excludes the prefix, so 0x1A is just the hex number 1A.
- What is the highest value a two-digit hex number represents?
- FF, which equals 255 in decimal — exactly one byte, the range 00 to FF covering all 256 possible byte values.
Advanced mathematical operations
Convert text to binary or hex
Convert between HEX, RGB, HSL color formats
Calculate percentages easily
Calculate percent increase or decrease
Add, subtract, multiply, divide fractions