Number Base Converter
Convert any number between binary, octal, decimal, hexadecimal and bases 2–36 — with huge-number support, grouped bits, and two’s complement for 8, 16, 32 and 64-bit values.
How to use the Number Base Converter
- Type a number. Prefixes 0b, 0o and 0x are detected automatically.
- Read every base at once and copy with ⧉.
- Use two’s complement to see how negative numbers are stored.
Prefixes
- 0b — binary, e.g. 0b1010.
- 0o — octal, e.g. 0o755.
- 0x — hexadecimal, e.g. 0xFF.
Frequently asked questions
How do I convert decimal to binary?
Type the decimal number; the binary value appears instantly.
What is 255 in hex?
FF.
Does it work with very large numbers?
Yes. It uses arbitrary-precision integers.
What is two’s complement?
The way computers store negative integers. Choose the bit width to see it.
Is my data uploaded?
No. Everything runs in your browser on your own device.
Worked examples: the same number in every base
These are numbers people convert most often. You can type any of them into the tool to check the result.
| Decimal | Hexadecimal | Binary | Octal |
|---|---|---|---|
| 10 | 0xA | 1010 | 12 |
| 255 | 0xFF | 1111 1111 | 377 |
| 2026 | 0x7EA | 111 1110 1010 | 3752 |
| 65535 | 0xFFFF | 1111 1111 1111 1111 | 177777 |
Why 255 and 65535 keep appearing
255 is the biggest number that fits in one byte (8 bits), and 65535 is the biggest that fits in two bytes. That is why an IPv4 address part stops at 255 and why many limits in software end at 65535.
Negative numbers and two’s complement
Computers store negative numbers using two’s complement. In 8 bits, −1 is written 1111 1111, the same bits as 255. The tool shows both readings, so you can see whether a value like 0xFF from a log means 255 or −1. It depends on whether the program treats the byte as signed.
Common mistakes
- Leading zeros. In some programming languages a number starting with 0, like 0755, is read as octal. 0755 octal is 493 in decimal.
- Letters in hex. A to F stand for 10 to 15. Upper or lower case does not matter.
- Grouping. Binary is easier to read in groups of 4 bits, because each group is exactly one hex digit.
The conversion runs in your browser. The numbers you type are not sent to us.