Convert whole numbers exactly between binary, octal, decimal, and hexadecimal — including numbers far larger than a calculator can normally handle precisely.
Enter a number to convert.
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 8 | 1000 | 10 | 8 |
| 16 | 10000 | 20 | 10 |
| 255 | 11111111 | 377 | FF |
| 1024 | 10000000000 | 2000 | 400 |
A number base converter rewrites the same whole number using a different counting system. The value doesn't change — only how it's written. Decimal 10, binary 1010, octal 12, and hexadecimal A all represent the exact same quantity.
Uses only the digits 0 and 1. This is the native representation computers use internally, since each digit corresponds to a single on/off electronic state.
Uses digits 0-7. Historically used in computing as a shorter stand-in for binary, since each octal digit maps to exactly three binary digits.
The everyday counting system, using digits 0-9.
Uses digits 0-9 plus A-F for values 10-15. Common in programming, color codes, and memory addresses, since each hex digit maps to exactly four binary digits.
Ordinary JavaScript numbers are stored as 64-bit floating-point values and only represent whole numbers exactly up to 2^53 (9,007,199,254,740,992). Beyond that, precision is silently lost, which would corrupt conversions of large numbers. This converter uses JavaScript's BigInt type throughout, which represents integers of any size exactly, so a very large binary or hexadecimal value still converts to the correct decimal number down to the last digit.
Number base conversions come up when reading memory addresses or color codes written in hexadecimal, working with binary or octal file permissions, studying computer science or digital logic, debugging low-level code, or simply checking a value someone else expressed in an unfamiliar base.
A number base is how many distinct digits a number system uses before it carries over to a new place value. Decimal (base 10) uses digits 0-9, binary (base 2) uses only 0-1, octal (base 8) uses 0-7, and hexadecimal (base 16) uses 0-9 and A-F.
Select Decimal as "From" and Binary as "To", then enter your number. For example, decimal 255 converts to binary 11111111.
Select Hexadecimal as "From" and Decimal as "To". For example, hex FF converts to decimal 255.
It uses BigInt arithmetic internally rather than ordinary JavaScript numbers, so it converts arbitrarily large integers exactly instead of losing precision above 2^53 (about 9 quadrillion), which is where standard floating-point numbers start to round.
Yes. Enter a leading minus sign (e.g. -255) and the sign carries through to the converted result in any base.
Hexadecimal digits are 0-9 followed by A-F (or a-f), representing values 10 through 15.
Explore Brekzy's growing collection of free calculators, converters, AI tools, and practical resources.