Number Base Converter

Pick the input base, type a number, and see binary, octal, decimal, hex and any other base at once — with the working.

Binary
1111 1111
Octal
377
Decimal
255
Hexadecimal
FF
Other base (36)
73

Bits: 8

Three ways to convert

  1. To decimal: positional expansion — multiply each digit by the base raised to its position and add. FF₍16₎ = 15×16 + 15 = 255.
  2. From decimal: repeated division — divide by the base, read the remainders bottom-up. 255 ÷ 16 = 15 r F, 15 ÷ 16 = 0 r F → FF.
  3. Binary ↔ octal / hex: group bits by 3 (octal) or 4 (hex) and replace each group. 1111 1111 → FF.

Notes

  • Integers of any length are converted exactly.
  • Prefixes are accepted: 0x hex, 0b binary, 0o octal; spaces and underscores are ignored.
  • Negative numbers: prefix with "-". Fractions are not supported yet.

Common values 0–255

DecimalBinaryOctalHex
0000
1111
21022
31133
410044
510155
611066
711177
81000108
91001119
10101012A
11101113B
12110014C
13110115D
14111016E
15111117F
161 00002010
3210 00004020
64100 000010040
100110 010014464
127111 11111777F
1281000 000020080
2551111 1111377FF
2561 0000 0000400100
100011 1110 100017503E8
1024100 0000 00002000400
40961 0000 0000 0000100001000
655351111 1111 1111 1111177777FFFF

Frequently Asked Questions

Related