A binary and hex converter in one
Type a number in any base: the All bases list under the result shows it in decimal, hex, binary and octal at the same time. Pick From and To for one conversion, or open one of the pages below for a worked example and a table.
For example, 255 is 11111111 in binary, 377 in octal and FF in hex.
All conversions
- Hex to Decimal converter
- Decimal to Hex converter
- Binary to Decimal converter
- Decimal to Binary converter
- Hex to Binary converter
- Binary to Hex converter
- Octal to Decimal converter
- Decimal to Octal converter
- ASCII to Hex converter
- Hex to ASCII converter
- Text to Binary converter
- Binary to Text converter
Number bases at a glance
| Decimal | Hex | Binary | Octal |
|---|---|---|---|
0 | 0 | 0 | 0 |
1 | 1 | 1 | 1 |
2 | 2 | 10 | 2 |
3 | 3 | 11 | 3 |
4 | 4 | 100 | 4 |
5 | 5 | 101 | 5 |
6 | 6 | 110 | 6 |
7 | 7 | 111 | 7 |
8 | 8 | 1000 | 10 |
9 | 9 | 1001 | 11 |
10 | A | 1010 | 12 |
11 | B | 1011 | 13 |
12 | C | 1100 | 14 |
13 | D | 1101 | 15 |
14 | E | 1110 | 16 |
15 | F | 1111 | 17 |
16 | 10 | 10000 | 20 |
32 | 20 | 100000 | 40 |
64 | 40 | 1000000 | 100 |
100 | 64 | 1100100 | 144 |
127 | 7F | 1111111 | 177 |
128 | 80 | 10000000 | 200 |
255 | FF | 11111111 | 377 |
256 | 100 | 100000000 | 400 |
Hex uses 16 digits (0–9 and A–F), binary only 0 and 1, octal 0–7. One hex digit is exactly 4 bits, so two hex digits make one byte.
FAQ
How are negative numbers converted?
Without a bit width, the sign is kept: −255 becomes −FF. Choose a bit width and turn on Signed to use two's complement, the way computers store negative numbers: −1 in 8 bits is FF.
Is there a size limit?
No practical one. Arbitrary-precision integers (BigInt) convert even 100-digit numbers exactly. Fractions aren't supported.
Is my data uploaded?
No. Everything is converted in your browser. Privacy