Number Base Converter
Type a number and see it in binary, octal, decimal and hexadecimal at once. Paste a list to convert many numbers together.
Free · Runs in your browser · Your text is never uploaded
How number bases work
A number base says how many digits are used before you carry to the next place. Decimal uses ten digits (0–9). Binary uses two (0 and 1), which is how computers store everything. Hexadecimal uses sixteen (0–9 and A–F), a compact way to write binary because one hex digit is exactly four bits. Octal uses eight (0–7) and appears in Unix file permissions.
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 5 | 0101 | 5 | 5 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 255 | 11111111 | 377 | FF |
Prefixes and input rules
In Auto mode, 0x means hexadecimal, 0b binary and 0o octal; a number without a prefix is read as decimal. If you pick a “From” base, digits are checked against it, so the letter G is rejected in hex. Spaces, underscores and thousands commas are ignored. Only whole numbers are supported.
Large numbers
The conversion uses exact big-integer arithmetic, so a 64-bit or even a 1,000-digit number converts without rounding errors, unlike a calculator that switches to scientific notation.
Negative numbers
A leading minus sign is kept: -17 becomes -10001 in binary. This is not two’s complement, which depends on a fixed bit width.
Everything runs in your browser. Nothing you paste is uploaded, logged or stored, so it is safe to use with private data.
Related guides
Popular number base converter presets
Frequently asked questions
How do I convert decimal to binary?
Enter the decimal number and read the Binary row. The tool repeatedly divides by 2 for you.
How do I convert hex to decimal?
Set From to Hexadecimal (or type 0x before the number) and read the Decimal row.
Why is one hex digit four bits?
Sixteen is 2 to the 4th power, so each hex digit maps to exactly four binary digits, which makes hex a short way to write binary.
Is there a size limit?
Numbers up to 4,000 digits, and up to 500 numbers at a time.
Does it handle fractions?
No, only whole numbers.