Number Base Converter
Convert numbers between binary, octal, decimal and hexadecimal.
Your data is never sent to any server.
The number base converter shows any number simultaneously in binary, octal, decimal and hexadecimal. Type the number, set its base and copy the representation you need.
Direct conversions
If you only care about one specific step, each has its own page with the method explained and worked examples:
| From binary | From decimal | From hexadecimal |
|---|---|---|
| to decimal | to binary | to decimal |
| to hexadecimal | to hex | to binary |
The same number in all four bases
| Decimal | Binary | Octal | Hexadecimal |
|---|---|---|---|
| 10 | 1010 | 12 | A |
| 64 | 1000000 | 100 | 40 |
| 255 | 11111111 | 377 | FF |
| 493 | 111101101 | 755 | 1ED |
The last row is the classic Linux chmod 755: each octal digit groups three
permission bits, which binary shows at a glance (111 101 101: read, write and
execute for the owner; read and execute for everyone else).
How to use Number Bases
- 1
Type the number
Enter the number you want to convert in the input field.
- 2
Set its source base
Select whether the number is in binary, octal, decimal or hexadecimal. If a digit does not exist in that base, the tool tells you which one.
- 3
Read all four representations
The result shows the number in binary, octal, decimal and hexadecimal at once, updated as you type.
- 4
Copy the one you need
Each base has its own copy button.
Frequently asked questions
Which bases does the converter support?
The four bases used in programming, binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16). Conversions between them are shown simultaneously.
Why does hexadecimal use letters?
Because it needs 16 symbols and there are only 10 digits. The letters A–F represent the values 10–15. For example, FF in hex is 255 in decimal.
What is octal used for today?
Its most common use is Unix/Linux file permission notation, like chmod 755, where each octal digit represents three permission bits.
Does it support negative or decimal numbers?
Negatives yes, with the sign in front: -10 in decimal is -1010 in binary. It does not compute two's complement, which depends on the bit width. Decimals no: commas and dots are treated as separators, so 3.5 would be read as 35.
Can I paste the number with a prefix or separators?
Yes. The 0b, 0o and 0x prefixes from programming languages are accepted, and spaces, underscores, dots, commas and colons are ignored, as in 1111_0000 or FF:FF.
Is there a size limit on the number?
Not in practice. The conversion uses arbitrary-precision arithmetic, so you can convert numbers far larger than fit in 64 bits.