Base Calculator

Convert numbers between any bases from 2 to 36, with binary, octal, decimal and hexadecimal shown alongside.

100% FreeNo sign-upPrivate — runs in your browser

Bases other than 2, 8, 10, 16 and 36 are supported by the maths — the dropdown lists the common ones, and the value is converted exactly with big integers, not floating point. This is arbitrary-base conversion, not the binary-arithmetic tool.

—

converted value

Binary (base 2)
—
Octal (base 8)
—
Decimal (base 10)
—
Hexadecimal (base 16)
—
Copied to clipboard

How to use this tool

1
Type the number

Enter the number in its source base, using digits 0–9 and letters A–Z for values above 9.

2
Choose the bases

Pick the source base and the target base. Common bases are listed; the maths handles any base from 2 to 36.

3
Read the converted value

The headline is the number in the target base, with binary, octal, decimal and hexadecimal equivalents alongside.

4
Check a digit if it fails

A digit must be smaller than the source base: F is valid in hexadecimal but not in decimal, and 2 is not a binary digit.

Formula & worked example

Convert by repeated division: to convert to base b, repeatedly divide by b and read the remainders backwards. Letters A–Z stand for digit values 10–35.

FF in hexadecimal is 15 × 16 + 15 = 255 in decimal, 11111111 in binary and 377 in octal.

Limitations — read this before you rely on it

Only whole numbers are converted; fractional parts in other bases need a separate digit-by-digit expansion and are not covered. Very long inputs are handled exactly with big integers, but there is no practical limit a browser page should need.

Frequently asked questions

The number of distinct digits a counting system uses. Decimal uses 10 digits, binary uses 2, hexadecimal uses 16.

Because base 16 needs 16 digits. After 0–9, the letters A–F stand for values 10–15.

Convert to decimal first by weighting each digit by its place value, then convert out of decimal by repeated division, reading remainders backwards.

No. That tool does binary arithmetic and the common conversions. This tool converts between any two bases from 2 to 36.

No, only whole numbers. Fractions in another base are a different calculation and are not included here.