Number System Converter
Type into any field — binary, octal, decimal, hex or a base of your choice — and every other field updates instantly.
Place value: the idea behind every base
In any base, a digit’s worth depends on its column. Each column is worth the base times the column to its right. Tap a digit to change it and watch the total.
1×32 + 1×8 + 1×4 + 1×1 = 45 in decimal
Decimal is the same system with ten digits: 347 is 3×100 + 4×10 + 7×1. Nothing about base 10 is special apart from our ten fingers.
Converting between bases
To go from any base to decimal, multiply each digit by the base raised to its position and add. To go from decimal to another base, divide by the base repeatedly and collect the remainders. Between binary, octal and hex there is a shortcut: group bits in threes for octal or fours for hex.
Each common conversion has its own page with the working written out: hex to decimal, binary to decimal, decimal to binary, decimal to hex, hex to binary and octal to decimal.
Questions people ask
What is a number system?
A number system (or base) is a way of writing numbers with a fixed set of digits. Decimal uses ten digits, binary two, octal eight and hexadecimal sixteen (0–9 then A–F). The value is the same; only the notation changes.
Which bases can this converter handle?
Any base from 2 to 36. Bases above 10 use letters as digits, so base 36 uses 0–9 and A–Z. That is the same range JavaScript’s parseInt and toString support.
Is there a size limit?
No practical one. The converter uses BigInt arithmetic, so a 200-digit decimal number converts exactly without rounding.
Why do computers use binary and hexadecimal?
Hardware stores bits, which have two states, so binary is native. Hex is a compact way for people to write binary: one hex digit is exactly four bits.