Skip to content

Number Base Converter

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

Result

Binary (base 2)
1111 1111
Octal (base 8)
377
Decimal (base 10)
255
Hexadecimal (base 16)
FF
73

Runs in your browser — nothing you enter is sent to a server.

How the Number Base Converter works

Type a whole number and choose the base it's written in. The converter shows it in binary, octal, decimal and hexadecimal, plus any other base from 2 to 36 you pick. Prefixes such as 0x, 0b and 0o are accepted, and so are spaces or underscores between digit groups.

Numbers are handled as exact big integers, so even a 64-bit value like 18,446,744,073,709,551,615 converts without rounding — something many converters get wrong above 253.

Formula

value = Σ di × bi

Where:

d
Each digit (A = 10, B = 11 … Z = 35)
b
The base
i
The digit's position, counting from 0 on the right

To go the other way, divide by the base repeatedly and read the remainders from last to first.

Examples

255 in other bases

Binary 1111 1111, octal 377, hexadecimal FF.

Hexadecimal FF to decimal

15 × 16 + 15 = 255.

The largest 64-bit number

18,446,744,073,709,551,615 = FFFF FFFF FFFF FFFF in hexadecimal.

Frequently asked questions

Why do programmers use hexadecimal?

Each hex digit is exactly four binary digits, so hex is a compact way to write binary — one byte is always two hex digits (00 to FF).

Can it convert fractions or negative numbers?

Negative whole numbers yes, written with a minus sign. Fractions no — they often have no exact representation in another base.

What is base 36?

The largest base that uses only digits and letters (0–9, A–Z). It's used for short IDs: ZZ in base 36 is 1,295.

Base64 Encoder & Decoder

Encode text to Base64 or decode Base64 to text, with full Unicode support and URL-safe output.

Developer Tools

Number to Words Converter

Write numbers out in English words, as check amounts, or as ordinals like “twenty-first”.

Converters