Number conversion

Number Base Converter

Convert exact integers from any base 2 through 36 to any other base. View binary, octal, decimal, hexadecimal, grouped bytes, Unicode hints, validation and calculation steps.

Base input

Convert from any base

base 2-36

Result number

Common bases

Binary, octal, decimal and hexadecimal

Binarybase 2
Octalbase 8
Decimalbase 10
Hexadecimalbase 16
Grouped binary4-bit groups
Grouped hexbyte groups

Developer view

ASCII / Unicode
Bit length
Byte length
Sign

Calculation steps

Source base to decimal

Decimal to destination base

How to convert from any base to any base

1. Source base to decimalMultiply each digit by the source base raised to its position, starting at position 0 on the right.
2. Decimal to target baseRepeatedly divide by the target base and collect each remainder as the next digit.
3. Digit values above 9A=10 through Z=35 provide the extra digit symbols.
4. Integer scopeExact integer conversion covers binary, hex, bytes, identifiers and most programming use cases.

Common base reference table

DecimalBinaryOctalHexadecimal
0000000
1000111
2001022
3001133
4010044
5010155
6011066
7011177
81000108
91001119
10101012A
15111117F
161 00002010
2551111 1111377FF

Number base converter FAQ

What bases are supported?

Integer conversion is supported from base 2 through base 36.

Can I convert prefixed values such as 0xFF?

Yes. Prefixes 0x, 0b and 0o are accepted when they match hexadecimal, binary and octal input.

Does the converter lose precision on large integers?

No. It uses JavaScript BigInt and does not convert values through floating-point Number arithmetic.

Why does base 36 use letters?

Base 36 uses digits 0-9 and letters A-Z, providing 36 digit symbols.