Convert a number between binary, octal, decimal and hexadecimal. Type into any one of the four fields and the others update instantly. It handles very large whole numbers and negatives, and runs entirely in your browser.
About this number base converter
Computers count in bases other than the everyday base 10. Binary (base 2) uses only 0 and 1 and is how machines store everything; hexadecimal (base 16) packs four binary digits into one and shows up in colour codes, memory addresses and byte values; octal (base 8) appears in file permissions. This number base converter ties all four together: type a value into any field — decimal, hex, binary or octal — and the other three update at once. It uses your browser's big-integer support, so it stays exact even for very large numbers that would lose precision in an ordinary calculator, and it handles a leading minus sign for negatives. Everything is worked out on your device, so nothing you enter is stored.
Frequently asked questions
- How do I convert, say, decimal to hex?
- Type your number into the Decimal field. The Hexadecimal, Binary and Octal fields fill in automatically — no button to press.
- Can it handle very large numbers?
- Yes. It uses big-integer maths, so even numbers far beyond a normal calculator's limit stay exact rather than being rounded.
- Does it accept hex letters in any case?
- Yes. Hexadecimal input accepts both upper and lower case (FF or ff), and results are shown in upper case by convention.
Reading numbers in another base
Positional numeral systems represent values based on a base, or radix, which dictates how many unique digits are available before a new column is created. In the standard decimal system, each position represents a power of ten, moving from right to left as units, tens, hundreds, and so on. Other bases follow this same logic by replacing ten with their respective radix. For instance, binary uses only two digits, meaning each position represents a power of two, while hexadecimal uses sixteen symbols, incorporating letters to represent values from ten to fifteen.
To convert a number from any base to decimal, you multiply each digit by the base raised to the power of its position index, starting at zero from the right. Summing these products yields the total value in base ten. Converting from decimal to another base involves repeatedly dividing the number by the target base and recording the remainders until the quotient reaches zero. The sequence of remainders, read in reverse order, provides the representation in the new system.
The most frequent error users encounter involves confusing the order of digits during manual conversion, particularly when reading remainders from top to bottom instead of bottom to top. Another common pitfall is the incorrect application of powers, where users miscount the position index starting from the left rather than the right. Additionally, users often overlook the character limit for bases higher than ten, such as assuming that hex values must be strictly numeric, which leads to confusion when letters appear in data fields.