Number Base Converter
Type a whole number, choose the base it is written in and the base you want. Works with numbers of any size, and shows the place-value or repeated-division working.
Convert between bases
How number bases work
In base 10 each place is worth ten times the place to its right: 255 = 2 × 100 + 5 × 10 + 5 × 1. Any other base works the same way with a different multiplier. In binary (base 2) the places are 1, 2, 4, 8, 16…, so 11111111₂ = 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255. Hexadecimal (base 16) uses the digits 0–9 and A–F for ten to fifteen, so FF₁₆ = 15 × 16 + 15 = 255.
Decimal to another base: repeated division
Convert 156 to binary
- 156 ÷ 2 = 78 r 0
- 78 ÷ 2 = 39 r 0
- 39 ÷ 2 = 19 r 1
- 19 ÷ 2 = 9 r 1
- 9 ÷ 2 = 4 r 1
- 4 ÷ 2 = 2 r 0
- 2 ÷ 2 = 1 r 0
- 1 ÷ 2 = 0 r 1
- Read the remainders from the bottom up
156₁₀ = 10011100₂
Binary ↔ hex shortcut
Every hex digit is exactly four binary digits, so you can convert by grouping: 1001 1100₂ → 9 and C → 9C₁₆. Octal digits are groups of three bits. That is why programmers use hex to write bytes compactly: one byte is two hex digits (00 to FF).
Limits
- Whole numbers only — fractional parts are not converted.
- Negative numbers are shown with a minus sign; two’s-complement representations depend on the word size, so they are not guessed.
- Inputs can be up to 256 digits long; arithmetic uses exact big integers, so there is no rounding.