How to use it
- Type the number.
- Choose the base it's written in.
- Read it in binary, octal, decimal and hex.
- Add a custom base (2–36) if you need one.
How positional number systems work
In base 10 each digit position is worth ten times the one to its right: 255 = 2 × 100 + 5 × 10 + 5 × 1. Other bases work the same way with a different multiplier. In binary (base 2) the positions are worth 1, 2, 4, 8, 16 and so on, so 11111111 = 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255. In hexadecimal (base 16) they're worth 1, 16, 256, 4,096…, and the digits 10 to 15 are written A to F, so FF = 15 × 16 + 15 = 255.
Same number, four bases
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 7 | 111 | 7 | 7 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 100 | 1100100 | 144 | 64 |
| 255 | 11111111 | 377 | FF |
| 1,024 | 10000000000 | 2000 | 400 |
| 65,535 | 1111111111111111 | 177777 | FFFF |
Where you'll use each base
- Binary is how computers store data. Each digit is a bit; eight bits make a byte.
- Hexadecimal is a compact way to write binary: one hex digit is exactly four bits. You'll see it in HTML colors (#FF8800), memory addresses, MAC addresses and error codes.
- Octal groups bits in threes and survives mainly in Unix file permissions (chmod 755).
- Base 36 uses all digits and letters and is used for short IDs and URL shorteners.
The result shows binary in groups of four and hex in groups of two, which makes long values easier to read and copy. The copy button copies the plain digits without spaces.
Big numbers and prefixes
The converter works with whole numbers of any length, not just the 64-bit range of a typical calculator, so you can convert a 40-digit decimal number or a 256-bit hex key exactly. The 0x prefix for hex and 0b for binary are optional; letters can be upper or lower case. A minus sign is kept. The bit count shows how many binary digits the number needs, ignoring the sign. If you type a digit that isn't valid for the chosen base, such as 2 in binary or G in hex, the tool lists the allowed digits.
Converting by hand
To convert decimal to another base, divide by the base repeatedly and write down the remainders from last to first. 156 in binary: 156 ÷ 2 = 78 r 0, 78 ÷ 2 = 39 r 0, 39 ÷ 2 = 19 r 1, 19 ÷ 2 = 9 r 1, 9 ÷ 2 = 4 r 1, 4 ÷ 2 = 2 r 0, 2 ÷ 2 = 1 r 0, 1 ÷ 2 = 0 r 1. Reading upward gives 10011100. Hex to binary is even easier: replace each hex digit with its four-bit pattern (9 = 1001, C = 1100, so 9C = 10011100). To see text as binary, try the binary translator.
Frequently asked questions
How do I convert binary to decimal?
Add up the place values of every 1. For 1011: 8 + 0 + 2 + 1 = 11.
What is FF in decimal?
FF in hexadecimal is 255.
Why do programmers use hex?
Each hex digit stands for exactly four bits, so a byte is always two hex digits. It's much shorter than binary and easy to convert back.
Does it handle negative numbers or fractions?
Negative whole numbers, yes; the minus sign is kept. Fractions and floating-point numbers aren't supported.
What does the 0x prefix mean?
It's a common way to mark a number as hexadecimal in code, for example 0xFF. You can type it or leave it out.
Last updated: November 12, 2026