Decimal to Hex
Tool processing runs in your browser — your pastes/files are not uploaded to our servers for processing. Ads (if shown) load separately and do not receive your tool inputs.Advertising · Details
Quick answer
To convert decimal to hexadecimal, divide by 16 repeatedly and read the remainders (10–15 → A–F) from last to first — for example 255 → FF. TryDevSnip's converter does it instantly and exactly, even for very large values, all in your browser.
Decimal to hex chart
| Decimal | Hex |
|---|---|
| 10 | A |
| 15 | F |
| 16 | 10 |
| 31 | 1F |
| 100 | 64 |
| 128 | 80 |
| 255 | FF |
| 256 | 100 |
| 1000 | 3E8 |
| 65535 | FFFF |
Reverse or related: hex to decimal · decimal to binary · binary to decimal · all bases
Worked example: 255
Every positional number system works the same way — each digit is multiplied by the base raised to its position, counting from zero on the right. For 255 in decimal:
| Digit | Place | Weight | Contribution |
|---|---|---|---|
| 2 | 102 | 100 | 200 |
| 5 | 101 | 10 | 50 |
| 5 | 100 | 1 | 5 |
| Total (decimal) | 255 | ||
Written in hexadecimal that is 0xFF.
Quick reference
| Decimal | decimal | hexadecimal |
|---|---|---|
| 1 | 1 | 1 |
| 2 | 2 | 2 |
| 4 | 4 | 4 |
| 8 | 8 | 8 |
| 10 | 10 | A |
| 16 | 16 | 10 |
| 32 | 32 | 20 |
| 64 | 64 | 40 |
| 100 | 100 | 64 |
| 128 | 128 | 80 |
| 255 | 255 | FF |
| 256 | 256 | 100 |
Things that trip people up
- Prefixes are notation, not value.
0b1010,0o12,0xAand10can all denote the same quantity. Strip the prefix before parsing, or tell the parser which base you meant. - Leading zeros can change the base. In several languages a leading
0historically meant octal, so010parsed as 8 rather than 10. Passing an explicit radix avoids the whole class of bug. - Hex letters are case-insensitive.
0xffand0xFFare the same number; only presentation differs. - Grouping is for humans. Binary is usually read in nibbles of four (
1111 1111) because each nibble maps to exactly one hex digit — which is why hex is the usual shorthand for binary data.
Frequently asked questions
How do I convert decimal to hex?
Divide the number by 16 repeatedly, writing down the remainders (10–15 become A–F) from last to first. For example 255 ÷ 16 = 15 r15 → FF. Or paste it into the converter and read the hex instantly.
What is 255 in hex?
255 (decimal) is FF in hexadecimal — two hex digits, the maximum value of one byte.
Do I get an uppercase or lowercase hex result?
The converter shows uppercase hex (FF). Hex is case-insensitive, so ff and FF are the same value — lowercase it if your code style requires.
Is my input uploaded?
No. TryDevSnip converts locally in your browser. Nothing you type is uploaded to our servers for processing.