Convert between Binary, Octal, Decimal, and Hexadecimal instantly
0b1010
0o12
10
0xA
0000 10100000 0000 0000 10100000 0000 0000 0000 0000 0000 0000 10101010 binary = 1×2³ + 0×2² + 1×2¹ + 0×2⁰ = 10 decimal
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 1 | 0001 | 1 | 1 |
| 2 | 0010 | 2 | 2 |
| 3 | 0011 | 3 | 3 |
| 4 | 0100 | 4 | 4 |
| 5 | 0101 | 5 | 5 |
| 6 | 0110 | 6 | 6 |
| 7 | 0111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 11 | 1011 | 13 | B |
| 12 | 1100 | 14 | C |
| 13 | 1101 | 15 | D |
| 14 | 1110 | 16 | E |
| 15 | 1111 | 17 | F |
The Number Base Converter translates a value between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16) in a single step. Enter a number in any one of these bases and the tool instantly shows its equivalent in the other three, so you never have to work through the division-and-remainder arithmetic by hand.
It is built for computer science and electronics students, embedded and firmware developers reading register values, and anyone decoding hex color codes, memory addresses, IP-related values, or bit masks. Because hex uses the digits 0-9 plus A-F and binary uses only 0 and 1, the converter also validates your input against the chosen base and flags characters that are not allowed.
Every positional number system uses a base (or radix) that sets how many digit symbols exist and the place value of each column. In decimal, the digits 0-9 give place values that are powers of 10; the number 253 means 2x100 + 5x10 + 3x1. Binary uses powers of 2, octal powers of 8, and hexadecimal powers of 16, where the letters A-F stand for the values 10-15.
To convert any base to decimal, multiply each digit by its base raised to the digit's position (counting from 0 on the right) and add the results. For example, binary 1011 equals 1x8 + 0x4 + 1x2 + 1x1 = 11. To go from decimal to another base, repeatedly divide by the target base and read the remainders from bottom to top: 11 divided by 2 gives remainders 1, 1, 0, 1, which is 1011.
Binary, octal, and hexadecimal share a convenient relationship because 8 = 2^3 and 16 = 2^4. That means three binary digits map exactly to one octal digit, and four binary digits (a nibble) map exactly to one hex digit. This is why programmers prefer hex: the byte 11111111 in binary is simply FF in hex, and 255 in decimal.
It converts between the four most common bases used in computing: binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Enter a value in any one of them and the equivalents in the other three appear automatically.
No. You select the base from the tool itself, so you just enter the raw digits. If you paste a value that includes a 0x or 0b prefix, remove it first so it does not get read as an invalid digit.
Each base only allows certain digits. Binary permits only 0 and 1, octal 0-7, decimal 0-9, and hexadecimal 0-9 plus A-F. Entering a digit outside the selected base's range, such as an 8 in binary mode, triggers a validation warning.
Yes. A hex color like FF is just a hexadecimal number equal to 255 in decimal, so you can split a color code such as FFA500 into its component pairs and convert each to decimal to see the RGB values.
This tool is designed for non-negative whole numbers, which covers the vast majority of student and programming use cases such as register values, memory addresses, and bit masks. Fractional and signed two's-complement representations are outside its scope.
Yes, it is completely free with no sign-up. The conversion runs entirely in your browser, so the numbers you enter are never uploaded to a server or stored anywhere.
You can convert everyday values like bytes, addresses, and typical assignment numbers without issue. Extremely long inputs are limited by standard browser number precision, so very large values may lose accuracy at the least significant digits.