Hex to Decimal
Convert hex to decimal, binary or octal with exact whole-number math: FF is 255. Pads hex to 8, 16, 32 or 64 bits and converts 200 lines at once. How it works
Use the Hex to Decimal
About the Hex to Decimal
Hex FF is 255 in decimal: F is 15, and 15 × 16 + 15 = 255. To convert hex to decimal, multiply each digit by a power of 16 (1, 16, 256, 4,096 and so on from the right) and add the results, with A to F standing for 10 to 15.
Common hex values in decimal and binary
| Hex | Decimal | Binary |
|---|---|---|
| A | 10 | 1010 |
| F | 15 | 1111 |
| 10 | 16 | 10000 |
| 64 | 100 | 1100100 |
| 7F | 127 | 1111111 |
| 80 | 128 | 10000000 |
| FF | 255 | 11111111 |
| 100 | 256 | 100000000 |
| 1F4 | 500 | 111110100 |
| 3E8 | 1000 | 1111101000 |
| 400 | 1024 | 10000000000 |
| 1000 | 4096 | 1000000000000 |
| FFFF | 65535 | 1111111111111111 |
Largest values by bit width
| Bits | Unsigned max (hex) | Unsigned max (decimal) | Signed max (hex) | Signed max (decimal) |
|---|---|---|---|---|
| 8 | FF | 255 | 7F | 127 |
| 16 | FFFF | 65535 | 7FFF | 32767 |
| 32 | FFFFFFFF | 4294967295 | 7FFFFFFF | 2147483647 |
| 64 | FFFFFFFFFFFFFFFF | 18446744073709551615 | 7FFFFFFFFFFFFFFF | 9223372036854775807 |
Signed maximums are for two’s-complement integers, where the top bit is the sign, so 7F is the largest signed byte and 80 the first value read as negative.
Frequently asked questions
- How do I convert hex to decimal by hand?
- Write each digit’s value (A = 10 up to F = 15), multiply it by 16 raised to its position counted from 0 at the right, and add: 1F4 = 1 × 256 + 15 × 16 + 4 = 500.
- What is FF in decimal?
- 255, the largest two-digit hex number and the largest value of one 8-bit byte. FFFF is 65535 and FFFFFFFF is 4294967295.
- What does 0x in front of a number mean?
- It marks the number as hexadecimal in C, JavaScript and many other languages: 0x1A is 26. Typing 0x in the field switches the From base to hexadecimal, and 0o switches it to octal. The Copy as menu adds 0x to a hex result, in upper or lower case.
- Can it convert very large hex numbers?
- Yes, up to 4,096 decimal digits, with whole-number arithmetic: DEADBEEF is 3735928559 and FFFFFFFFFFFFFFFF is 18446744073709551615, every digit exact. An ordinary JavaScript number holds whole numbers exactly only up to 9,007,199,254,740,991.
- How do I convert a negative hex number?
- Type the minus sign: -FF is -255. The converter keeps the sign and does not use two’s complement, so FF is never read as -1. Padding to a bit width is shown for values of 0 and above.
- Can I convert a list of hex values?
- Yes. Open Batch and paste up to 200 lines, one value per line. Each row shows the value in decimal, hex, binary and octal, and a line that is not a valid number says why.
Related Tools
View all toolsBinary Converter
Convert text to binary and binary back to text in UTF-8: Hello is 01001000 01100101 01101100 01101100 01101111. A second tab converts whole numbers.
Number Base Converter
Convert a whole number between binary, octal, decimal and hexadecimal and see all four at once: 255 is 11111111, 377 and FF.
Roman Numeral Converter
Convert Roman numerals to numbers and numbers to Roman numerals, from 1 to 3,999,999, with a step breakdown. Spellings such as IIII are refused.
ASCII to Hex Converter
Text to hex and back: ASCII characters become two-digit codes, and é, € or emoji become code points or UTF-8, UTF-16 or Windows-1252 bytes.
Hex to ASCII
Convert hex to ASCII text: 48 65 6C 6C 6F is Hello. Bytes are read as UTF-8, and odd digit counts or bad characters get an error.
Unicode Lookup
Look up any character or code point such as U+1F600: its name, category, script, block and UTF-8, UTF-16 and UTF-32 bytes, or search names and browse blocks.