Number Base Converter
A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call
Free number base converter. Convert whole numbers of any size between binary, octal, decimal and hexadecimal, or any base from 2 to 36, instantly.
- Binary
- 0
- Octal
- 0
- Decimal
- 0
- Hexadecimal
- 0
- Your base
- 0
- Bits
- 0
Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.
How to use the number base converter
- Type a whole number.
- Choose its base: decimal (10), binary (2), octal (8), hexadecimal (16) or base 36.
- Optionally, choose another base from 2 to 36 to see as well.
The number base converter instantly shows the number in binary, octal, decimal and hexadecimal, plus your chosen base, and how many bits it needs. It works with numbers of any size, far beyond the limits of a normal calculator, and accepts common prefixes such as 0x for hex and 0b for binary. Everything runs in your browser.
What number bases are
A number base (or radix) is how many different digits a number system uses:
- Decimal (base 10): 0–9. The everyday system.
- Binary (base 2): 0 and 1. How computers store everything.
- Octal (base 8): 0–7. Used for Unix file permissions.
- Hexadecimal (base 16): 0–9 and A–F. A compact way to write binary, used for colours, memory addresses and byte values.
- Base 36: 0–9 and A–Z. Used for short IDs and URL shorteners.
Each position in a number is worth the base raised to a power. In decimal, 255 is 2 × 100 + 5 × 10 + 5 × 1. In binary, 11111111 is 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255. In hex, FF is 15 × 16 + 15 = 255.
Converting by hand
Decimal to binary: divide by 2 repeatedly and read the remainders from bottom to top. 13 → 6 r1 → 3 r0 → 1 r1 → 0 r1, so 13 = 1101.
Binary to decimal: add the place values of the 1s. 1101 = 8 + 4 + 0 + 1 = 13.
Binary to hex: group the bits in fours from the right and convert each group. 1101 0110 = D6.
Hex to decimal: multiply each digit by 16 to the power of its position. 2A = 2 × 16 + 10 = 42.
The converter does all of these instantly, for numbers of any length.
Where you'll meet other bases
Colours on the web. #C8A27A is three hex bytes: C8 (200) red, A2 (162) green, 7A (122) blue. The HEX to RGB converter converts colours directly.
File permissions. chmod 755 is octal: 7 (rwx), 5 (r-x), 5 (r-x). The chmod calculator explains each digit.
Networking. IP addresses and subnet masks are binary underneath: 255.255.255.0 is 24 ones followed by 8 zeros. The subnet calculator shows the binary mask.
Text encoding. Characters are stored as numbers; "A" is 65, 0x41, 01000001. The Unicode converter and the binary translator show the codes for text.
Hashes and IDs. Hashes from the hash generator and IDs from the UUID generator are written in hex.
Big numbers
Many calculators and programming languages lose precision above about 9 quadrillion (2⁵³), because they store numbers as floating point. This converter uses arbitrary-precision integers (BigInt), so a 64-bit maximum like 18,446,744,073,709,551,615 converts exactly to hex FFFFFFFFFFFFFFFF and 64 ones in binary.
Negative numbers
The converter accepts negative numbers and shows them with a minus sign in every base. Computers usually store negative integers in two's complement, which depends on the number of bits (8, 16, 32 or 64), so −1 is FF in 8 bits but FFFFFFFF in 32 bits. If you need two's complement, add 2ⁿ to the negative number first, where n is the bit width, then convert.
Fractions
This tool converts whole numbers. Fractions in other bases are possible (0.5 in decimal is 0.1 in binary), but many decimal fractions, like 0.1, never end in binary, which is why computers sometimes show 0.1 + 0.2 as 0.30000000000000004.
Bits and bytes
The "Bits" figure shows how many binary digits the number needs: 255 needs 8 bits (one byte), 256 needs 9. It's a quick way to see whether a value fits in a byte (up to 255), a 16-bit integer (up to 65,535) or a 32-bit integer (up to 4,294,967,295). The data storage converter converts between bytes, kilobytes and larger units.
Learning number bases
Number bases are a standard topic in computing courses, and practising a few conversions by hand makes the ideas stick. Try converting your age, the current year and a few colours from hex to decimal, then check your answers here. Spotting patterns helps too: every hex digit is exactly four binary digits, every octal digit is three, and powers of two are always a 1 followed by zeros in binary (8 is 1000, 16 is 10000). Once those patterns are familiar, most everyday conversions become quick mental arithmetic.
Common mistakes with number bases
Confusing similar characters. In hex, "B" (11) and "8", or "O" and "0", are easy to mix up when reading from screens or printouts. The number base converter rejects characters that aren't valid digits in the chosen base, which catches many typos.
Forgetting the base. "10" means ten in decimal, two in binary, eight in octal and sixteen in hex. When writing numbers in documents, add a prefix (0x, 0b, 0o) or a subscript to make the base clear.
Losing precision with large numbers. Many tools silently round very large integers. This converter uses arbitrary-precision integers, so values like 64-bit IDs convert exactly.
Mixing up signed and unsigned values. The same bits can mean a large positive number or a negative number, depending on whether they're read as signed. Know which interpretation your system uses.
Hexadecimal colours and bytes
Each pair of hex digits is one byte, from 00 (0) to FF (255). That's why web colours use six hex digits: two each for red, green and blue. #FFFFFF is white (255, 255, 255), #000000 is black, and #808080 is middle grey (128, 128, 128). Converting a pair with the number base converter shows its decimal value instantly, which helps when matching colours between design tools that use different formats.
A number base converter for learning
Students learning computing often find number bases confusing at first. Converting the same number into several bases at once, and seeing the patterns side by side, makes the idea click: each hex digit is four binary digits, each octal digit three, and powers of two are always a 1 followed by zeros in binary.
A number base converter for debugging
Developers often switch between bases while debugging: reading memory addresses in hex, checking flags in binary, or comparing IDs in decimal. Pasting a value into a number base converter shows all forms at once, which saves time and avoids mistakes when moving between tools that display numbers differently.
Quick tips
- Add prefixes like 0x and 0b in documents so the base is clear.
- Double-check similar characters such as O and 0, or B and 8, when copying hex values.
- Use the bits figure to check whether a value fits in a byte or a 32-bit field.
- Keep big numbers as text in spreadsheets so they don't lose precision.
Privacy and accuracy
Everything you enter here, your numbers, stays in your browser. Nothing is uploaded, saved on a server or shared, and it's all gone when you close the page, so the tool is safe to use with real figures and private details. The tool follows fixed, published rules, with no AI guessing involved, so the same input always gives the same result. It's used every day by developers and students, on phones, tablets and computers, with no sign-up and no limits.
A worked example
A bakery's developer is building a loyalty card system and wants short, readable card codes instead of long numbers. Each customer has a numeric ID, and the newest is 2,176,782,335.
She enters 2176782335 in the number base converter with base 36 as the extra base. It's "ZZZZZZ" in base 36: the largest six-character base-36 code. So six characters are enough for over 2 billion customers. The same ID is 81BF0FFF in hex and needs 32 bits.
For customer 1,000,000, base 36 gives "LFLS", only four characters, short enough to print on a card and type at the till. She uses base-36 codes for the cards and stores the numeric ID in the database.
Need more customers from Google?
This tool is free and runs in your browser. If your business also needs more leads or sales, Google Ads is where people search with their wallet out. DeepRit is a Google Ads agency that does PPC and nothing else: we build the campaigns, block the searches that waste money, write the ads, set up conversion tracking and send you a short report every week. Request a free PPC audit and we will show you, in dollars, what we would fix first.
Frequently asked questions
How do I convert decimal to binary?
Divide by 2 repeatedly and read the remainders from bottom to top, or type the number into this number base converter.
How do I convert hex to decimal?
Multiply each hex digit by 16 to the power of its position and add them. FF = 15 × 16 + 15 = 255.
What is base 36?
A number system using 0–9 and A–Z. It's used for short IDs and codes.
Can it convert very large numbers?
Yes. It uses arbitrary-precision integers, so numbers of any size convert exactly.
Does it handle negative numbers?
Yes, with a minus sign. For two's complement, add 2ⁿ for your bit width first.
Is this number base converter free?
Yes. It's free, needs no sign-up and runs in your browser.
Free PPC audit
See where your ad budget leaks.
We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.