Number Base Converter

Updated July 2026

Convert a whole number between any base from 2 to 36 — binary, octal, decimal, hexadecimal and everything in between. Enter a value, pick its source base and a target base, and see the result plus all the common bases at once. Arbitrary-size integers are supported and everything runs privately in your browser.

A number base (or radix) is how many digits a positional system uses, and each position is worth the base raised to a power. Converting "base 2 to base 10" means reading a binary string as a value, then writing that value with decimal digits — for example binary 1111 1111 equals decimal 255, which is hex FF.
Digits 0–9 and A–Z (case-insensitive). Whole numbers only.
Result
Binary (base 2)
Octal (base 8)
Decimal (base 10)
Hexadecimal (base 16)

How this number base converter works

Every number you write is stored in a positional system: each digit is worth a power of the base, depending on where it sits. In decimal (base 10) the number 255 means 2×10² + 5×10¹ + 5×10⁰. Change the base and the same idea applies with a different multiplier — binary uses powers of 2, hexadecimal uses powers of 16.

To convert, this tool first reads your input in its source base, building up the exact value by multiplying each digit by the base and adding the next digit. It then converts that value to the target base by repeated division: divide by the target base, keep the remainder as a digit, and repeat until nothing is left, reading the remainders backwards. Letter digits A–Z cover values 10–35, and hexadecimal output is shown in uppercase.

Worked example: decimal 255 is FF in hexadecimal, 11111111 in binary and 377 in octal. The binary string has eight 1s because 255 = 2⁸ − 1, and each pair of binary digits beyond that maps cleanly onto the hex digits F (1111) and F (1111).

Reference note: this converter handles whole numbers only and uses BigInt arithmetic, so arbitrarily large integers convert exactly without the rounding errors ordinary JavaScript numbers would introduce above 253. A leading minus sign is accepted for negative integers.

Example conversions

DecimalBinaryOctalHex
10101012A
16100002010
42101010522A
25511111111377FF
256100000000400100
1000111110100017503E8

Frequently asked questions

What is a number base?
A number base, or radix, is how many distinct digits a positional system uses. Base 10 uses 0–9; base 2 uses only 0 and 1. Each position is worth the base raised to a power, so in base 10 the places are ones, tens, hundreds, and so on.
How do I convert between bases?
Read the source number as a value by multiplying each digit by the base raised to its position, then repeatedly divide that value by the target base and collect the remainders, which become the new digits read from last to first. This tool does both steps instantly.
What is hexadecimal?
Hexadecimal is base 16. It uses 0–9 plus A–F for the values 10 through 15. Each hex digit maps to exactly four binary digits, so one byte is two hex digits — for example 255 in decimal is FF in hex.
What bases are supported?
Any base from 2 to 36 for both source and target. Bases up to 36 use 0–9 then A–Z, giving 36 symbols. Letter digits are case-insensitive on input and shown in uppercase on output.
Why use BigInt for large numbers?
Ordinary JavaScript numbers lose precision above 2⁵³, so long binary or big hex values would round wrongly. This converter uses BigInt arithmetic, which handles arbitrarily large whole numbers exactly, with no rounding errors.
What is base 36?
Base 36 is the largest base in the standard alphanumeric set: ten digits 0–9 plus twenty-six letters A–Z, for 36 symbols. It gives the shortest letter-and-number representations, handy for compact IDs and short codes.
⚡ Number Base Converter — by larely ↗

Related tools

Temperature Converter

Convert between Celsius, Fahrenheit and Kelvin instantly.

Decimal to Fraction Converter

Convert any decimal to a simplified fraction, including repeating decimals.

Ring Size Converter

Convert ring sizes between US, UK, EU and Japan, plus mm measurements.

Data Storage Converter

Convert between bytes, KB, MB, GB and TB in both 1000 and 1024 bases.

Weight Converter

Convert weight between kg, lb, oz, grams and stone instantly.

Length Converter

Convert length between cm, inches, meters, feet, km and miles.

Angle Converter

Convert angles between degrees, radians, gradians and turns.

Pressure Converter

Convert pressure between psi, bar, kPa, atm and mmHg.

Speed Converter

Convert speed between mph, km/h, m/s, knots, ft/s and Mach.

Time Converter

Convert time between seconds, minutes, hours, days, weeks and years.

Volume Converter

Convert volume between liters, gallons, cups, fluid ounces, mL and more.

Area Converter

Convert area between square feet, square meters, acres, hectares and more.

Browse all 251 free tools →