Part of the Math & Statistics suite · 235 calculators

Number Base Converter

Convert whole numbers between binary, octal, decimal, hexadecimal and any base from 2 to 36.

A number in base b is a sum of digit × bᵏ.

Results update as you type
Results
Converted
11111111
Decimal value
Binary
Octal
Hexadecimal
Bits needed
Reviewed September 2026. Pure mathematics: the result does not depend on where you are. Terminology follows US usage (math, parentheses, decimal point).
No account required · Google Analytics off unless allowedCalculator arithmetic runs in your browserResults update as you type
All calculations run 100% in your browser. The calculator code does not submit your figures to GlobalCalc to obtain a result.
About number base converter

How the number base converter works

A number in base b is a sum of digit × bᵏ. To convert, first read the input in its base to get the value, then repeatedly divide by the target base and collect remainders. Hexadecimal digits run 0–9 then A–F; base 36 uses all letters.

Formula: value = Σ digitₖ × bᵏ

Worked examples

InputsConvertedNote
255 to binary1111111111111111
FF from hex to decimal255255
1010 binary to hexAA

Frequently asked questions

Why do computers use binary?

Two states — on and off — are easy to build and reliable; every other base is a notation on top of that.

Why is hexadecimal popular?

One hex digit is exactly four bits, so a byte is two hex digits: 255 = FF.

What is 0x and 0b?

Prefixes for hex and binary in most programming languages; the converter accepts them.

How do I convert binary to decimal by hand?

Add the powers of two where there is a 1: 1011 = 8 + 2 + 1 = 11.

What is the largest number it handles?

2⁵³ − 1 ≈ 9 × 10¹⁵, the exact-integer limit of JavaScript numbers.

Where these figures come from

Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.