Developer converter

Number base converter

Convert integers and fractional values between bases 2 through 36. Long integers use exact arithmetic instead of floating-point approximations.

4210 = 1010102

Same value in common bases

BaseValue

Common bases

Popular base conversions

Method

How positional number bases work

A positional numeral uses each digit's position as a power of its base. Decimal 42 is 4 x 10 + 2; binary 101010 is 1 x 32 + 1 x 8 + 1 x 2, so both represent the same value.

Digits above 9 use letters A through Z, allowing bases up to 36. Letter case does not change the value.

Digit ranges

BaseAllowed digits
2 (binary)0-1
8 (octal)0-7
10 (decimal)0-9
16 (hexadecimal)0-9, A-F
360-9, A-Z

Complete directory

Base 2-36 conversions