Skip to main content
Data / Number / Computer Science Tools

Number Base Converter

Convert a number between any two bases from 2 to 36 - binary, octal, decimal, hex, or any custom base.

Enter a number, its current base, and your target base (2-36) - this tool converts it accurately using BigInt arithmetic.

Supports bases 2-36 (using digits 0-9 and letters A-Z). Only integer values are supported, and results are limited to JavaScript's safe integer range (2^53-1).

For the most common conversions specifically, the dedicated Binary/Hex/Octal converters may be quicker to use.

What Is a Number Base?

A number's base (or radix) determines how many unique digits it uses and what each position is worth - binary is base 2, octal is base 8, decimal is base 10, hexadecimal is base 16, and any base from 2 to 36 is possible using digits 0-9 and letters A-Z for values above 9.

How to Use It

  1. Enter a number and select its current base.
  2. Select the target base (2 to 36).
  3. The converted value appears instantly - digits invalid for the selected source base are flagged.

Limitations

This converts non-negative whole numbers accurately for arbitrarily large values using BigInt - fractional values in non-decimal bases aren't supported, since their interpretation varies and isn't universally standardized.

Example

The decimal number 255 in several bases:

BaseName255 is written
2Binary11111111
8Octal377
10Decimal255
16HexadecimalFF
36Base 3673

Why Base 36?

Base 36 uses all ten digits and all 26 letters, so it writes large numbers in very few characters. It is used for short IDs and URL shorteners - in JavaScript, (123456789).toString(36) gives 21i3v9.

How Conversion Works

Every conversion goes through the number's value: read the input digits using the source base's place values, then write that value in the target base by repeated division. The dedicated tools show those steps in detail.

Common Mistakes

  • Using a digit that does not exist in the source base - 8 in octal, or G in hex.
  • Forgetting that 010 may mean octal 8 in some languages, not decimal 10.
  • Mixing up letter digits: in base 16, A = 10 and F = 15.

For the common pairs, see Binary to Decimal, Decimal to Hex and the Octal Converter.

Frequently Asked Questions

Any base from 2 to 36. Bases above 10 use letters: A = 10, B = 11 and so on up to Z = 35.

There are 10 digits and 26 letters, giving 36 symbols. Higher bases would need extra symbols.

No fractions - the converter works with whole numbers up to 2^53 - 1, JavaScript's safe integer limit, and converts them exactly.
Share this tool: