How to use this tool
- Type a number into any of the four boxes.
- The other boxes update with the same value in their base.
- For text, type in the lower box to see each character as binary and hex bytes (UTF-8).
How number bases work
Decimal uses ten digits and place values that are powers of 10. Binary uses only 0 and 1, with place values 1, 2, 4, 8, 16 and so on. Hexadecimal uses 0–9 and A–F for ten to fifteen, with place values that are powers of 16. Octal uses 0–7.
| Decimal | Binary | Hex |
|---|---|---|
| 5 | 0101 | 5 |
| 10 | 1010 | A |
| 15 | 1111 | F |
| 16 | 1 0000 | 10 |
| 255 | 1111 1111 | FF |
Where you see them
Hex appears in web colour codes (#0D6B57), memory addresses and MAC addresses. Binary underlies everything a computer stores. Students meet both in computer science and digital electronics courses.
Text to binary
Each character is turned into bytes using UTF-8. Plain English letters take one byte each: "H" is 01001000 (hex 48). Accented letters, Urdu, Hindi and emoji take two to four bytes.
Frequently asked questions
How do I convert binary to decimal?
Add the place values where there's a 1. 1101 = 8 + 4 + 0 + 1 = 13.
How do I convert decimal to hex?
Divide by 16 repeatedly and write the remainders as hex digits from the last to the first. 255 is FF.
What is 1010 in decimal?
10.
Is there a size limit?
No practical limit. The converter uses big integers, so very long numbers work.