Number Base Converter

Convert integers between binary, octal, decimal, hexadecimal and any base from 2 to 36 — exactly, even for very large numbers.

  • Tested formula
  • Instant results
  • Updated September 28, 2026

Your details

Results Updates as you type

How base conversion works

In a positional number system, each digit is multiplied by the base raised to the power of its position. To convert into decimal, add up those values. To convert out of decimal, divide repeatedly by the new base and collect the remainders.

Value = dₙ × bⁿ + … + d₁ × b¹ + d₀ × b⁰
Example: The decimal number 255 is 11111111 in binary (eight 1-bits: 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1), 377 in octal (3 × 64 + 7 × 8 + 7) and FF in hexadecimal (15 × 16 + 15).

Quick reference

DecimalBinaryOctalHex
0000
1111
21022
510155
81000108
10101012A
15111117F
16100002010
321000004020
64100000010040
100110010014464
1281000000020080
25511111111377FF
256100000000400100
1024100000000002000400

Prefixes 0b (binary), 0o (octal) and 0x (hex) are accepted and ignored. Underscores and spaces used as digit separators are removed.

Frequently asked questions

How do I convert decimal to binary?
Repeatedly divide by 2 and record the remainders; reading them from last to first gives the binary number. 13 ÷ 2 = 6 r1, 6 ÷ 2 = 3 r0, 3 ÷ 2 = 1 r1, 1 ÷ 2 = 0 r1 → 1101.
How do I convert hexadecimal to decimal?
Multiply each digit by 16 raised to its position (counting from 0 on the right) and add. 2F = 2 × 16 + 15 × 1 = 47. The letters A–F stand for 10–15.
Why do programmers use hexadecimal?
Each hex digit represents exactly four binary digits (bits), so one byte is always two hex digits. That makes long binary values like memory addresses and colors (#1F5EFF) much easier to read.
Can I convert very large numbers?
Yes. The converter uses arbitrary-precision integers, so numbers with hundreds of digits are converted exactly. Fractions (digits after a point) are not supported.

Last reviewed September 28, 2026. Results are estimates for informational purposes; see our disclaimer.