Number Base Converter - Convert Between Any Number Bases

DecimalBinary

111111112

Binary (base 2)11111111
Octal (base 8)377
Decimal (base 10)255
Hexadecimal (base 16)FF

Step-by-step conversion

1. Divide decimal by 2, collect remainders

Read the remainders from bottom to top to get the base 2 answer.

Value ÷ 2QuotientRemainder
255 ÷ 212711
127 ÷ 26311
63 ÷ 23111
31 ÷ 21511
15 ÷ 2711
7 ÷ 2311
3 ÷ 2111
1 ÷ 2011

Read bottom-up: 11111111

How to Use This Calculator

  1. Type the number into the "Number to convert" field — letters A–Z stand for digit values 10–35 (so F = 15, Z = 35).
  2. Pick the base your number is currently written in from the "From base" dropdown.
  3. Pick the base you want using the "To base" dropdown.
  4. Read the answer in the large result box, or scan the four standard bases (binary, octal, decimal, hex) below it.
  5. Use the swap arrow to flip the conversion direction, and open the step-by-step table to see the math.

Share this calculator

Help others solve their calculations

Found this calculator helpful? Share it with your friends, students, or colleagues who might need it!

Number Base Converter: How to Convert Between Binary, Octal, Decimal & Hexadecimal

About the Author

Marko Šinko - Co-Founder & Lead Developer

Marko Šinko

Co-Founder & Lead Developer, AI Math Calculator

Lepoglava, Croatia
Advanced Algorithm Expert

Croatian developer with a Computer Science degree from University of Zagreb and expertise in advanced algorithms. Co-founder of award-winning projects, ensuring precise mathematical computations and reliable calculator tools.

📅 Published:
Number base converter showing one value rewritten in binary, octal, decimal and hexadecimal with conversion arrows.

A number base converter takes one number and rewrites it in a different counting system — turn decimal 255 into binary 11111111, or hex FF into octal 377, all in a single step. The number itself never changes. Two hundred fifty-five apples are still two hundred fifty-five apples whether you write the count as 255, FF, or 11111111. Only the notation shifts. This guide walks through what a base actually is, how the conversion math works in both directions, and where the four common bases — base 2, 8, 10, and 16 — earn their keep.

A Base Is Just a Bundle Size

Think of a base as how big a bundle you allow before you carry. In base 10 you bundle in tens: once you hit ten ones, you trade them for a single "tens" column. The number 4,072 means 4 thousands, 0 hundreds, 7 tens, and 2 ones — each column is a power of ten (10³, 10², 10¹, 10⁰). Change the base and you only change the bundle size. Base 2 bundles in twos, so the columns are powers of two: 1, 2, 4, 8, 16, 32, and so on. Base 16 bundles in sixteens, which is why it needs six extra digit symbols — A through F — to represent the values 10 through 15 in a single column.

That single idea — "digit times place value, then add" — powers every conversion. The biggest digit you can use is always one less than the base: base 2 uses 0 and 1, base 8 uses 0–7, and base 16 uses 0–9 plus A–F. If you ever see a digit that's too big for its base, like an 8 inside a supposedly octal number, something is wrong.

Every Conversion Routes Through Decimal

Here's the trick that makes converting between any two bases manageable: go through base 10 as a hub. Rather than memorize a direct base-7-to-base-13 procedure, you do it in two stages. First turn the source number into decimal, then turn that decimal into the target base. The calculator above does exactly this, which is why it can handle any base from 2 to 36.

Stage one — source to decimal — uses positional expansion. Take the hex number 2F. The digit 2 sits in the 16¹ place and F (which equals 15) sits in the 16⁰ place: 2 × 16 + 15 × 1 = 32 + 15 = 47. Stage two — decimal to target — uses repeated division. To push 47 into binary, divide by 2 over and over and collect the remainders:

StepDivisionQuotientRemainder
147 ÷ 2231
223 ÷ 2111
311 ÷ 251
45 ÷ 221
52 ÷ 210
61 ÷ 201

Read the remainders from bottom to top — 101111 — and you have 47 in binary. The bottom-to-top rule trips people up constantly, so it's worth saying twice: the last remainder you calculate is the first digit of the answer. If you only need plain binary work, the dedicated decimal to binary calculator shows the same division ladder with a binary-only focus.

The Hex–Binary Shortcut Worth Memorizing

Programmers rarely convert hex to binary through decimal, because there's a faster path. Sixteen is two to the fourth power, so every single hex digit maps to exactly four binary digits — no division required. Memorize the sixteen patterns once and you can translate at sight:

HexBinaryHexBinary
0000081000
1000191001
20010A1010
30011B1011
40100C1100
50101D1101
60110E1110
70111F1111

So hex B8 becomes 1011 1000 by stitching B (1011) next to 8 (1000) — no arithmetic at all. The same logic works for octal in groups of three bits, since 8 is two cubed. This is the real reason hex and octal exist: they're shorthand for binary that humans can actually read. For deeper drills in a single system, the hexadecimal calculator and binary calculator let you add and subtract directly in those bases.

Three Conversions, Start to Finish

Binary 11010 to decimal. Lay out the place values from the right: 16, 8, 4, 2, 1. The digits are 1, 1, 0, 1, 0, so you keep the 16, 8, and 2 columns: 16 + 8 + 2 = 26.

Decimal 250 to hexadecimal. Divide by 16: 250 ÷ 16 = 15 remainder 10. Then 15 ÷ 16 = 0 remainder 15. The remainders 10 and 15 become A and F, read bottom-up, giving FA. Quick check: F is 15 sixteens (240) plus A which is 10, totals 250. Correct.

Octal 752 to binary. Use the three-bit shortcut: 7 = 111, 5 = 101, 2 = 010. Concatenate to get 111101010. Going the long way through decimal (752 octal = 490) and back would land on the same answer, but the grouping trick is far faster.

Where Conversions Go Wrong

  • Reading remainders top-down. The division method produces digits in reverse. Always read the remainder column from bottom to top, or your answer comes out mirrored.
  • Using a digit that's too big for the base. Writing "19" in base 8 is meaningless — octal stops at 7. The converter above flags the exact offending character instead of guessing.
  • Forgetting that letters are digits. In bases above 10, A–F (and beyond, up to Z in base 36) are real digit values, not labels. C in hex is the number 12, full stop.
  • Dropping leading zeros in grouped conversions. When expanding hex to binary, every digit must become a full four bits. Hex 1 is 0001, not just 1, or the bit alignment breaks.

Why Computers Care About Base 2, 8, and 16

Computers store everything as binary because a transistor is either on or off — base 2 maps perfectly onto that physical reality. But long binary strings are miserable for humans: a single byte like 11111111 is hard to read and easy to miscount. Hexadecimal compresses that same byte into two tidy digits (FF), which is why colors on the web are hex (#FF5733), memory addresses are hex, and file hashes are hex. Octal shows up in Unix file permissions — chmod 755 is three octal digits, each encoding three permission bits. Understanding base conversion turns those cryptic codes into something you can actually decode. If you want to explore the arithmetic side of a chosen base, the general base calculator handles operations across mixed bases.

When to Reach for This Number Base Converter

  • Decoding a hex color, memory address, or RGB value back into decimal you can reason about.
  • Checking computer science homework on positional notation without grinding through long division by hand.
  • Translating Unix chmod permission codes between octal and the underlying binary bits.
  • Working with unusual bases — base 12, base 20, base 36 — where there's no mental shortcut and you just need a fast, exact answer.

Frequently Asked Questions

Still Have Questions?

The detailed content on this page provides comprehensive explanations and examples to help you understand better.