Number base converter: binary, decimal, hex and octal

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

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

How to use

Enter a whole number and choose which base it’s written in. You’ll instantly see it in binary, octal, decimal and hexadecimal, plus any base from 2 to 36.

Letter case doesn’t matter, spaces and underscores between digits are ignored, and the 0b, 0o and 0x prefixes are recognized. Numbers can be any length — no precision is lost.

How it works

In base N, each digit is worth N times more than the digit to its right. For example, binary 1011 = 1·8 + 0·4 + 1·2 + 1·1 = 11. Bases above 10 use letters as digits: A = 10, B = 11, … F = 15, … Z = 35.

Examples

FAQ

Can I convert fractions? No, the converter works with whole numbers, including negative ones.

What is base 36 used for? Short IDs and URL slugs: it uses all ten digits and all 26 Latin letters.