Skip to content

Number Base Converter

Convert between binary, octal, decimal, and hexadecimal in one tap, plus any custom radix from 2 to 36.

Convert positive integers between binary, octal, decimal and hexadecimal — or any custom base from 2 to 36.

What is a base?

The "base" of a number system is the number of distinct digits it uses. Decimal (the everyday system) uses ten digits, 0 through 9. Binary uses two: 0 and 1. Hexadecimal uses sixteen, 0–9 followed by A–F. The position of a digit gives it a place value: in decimal, the second digit from the right represents tens; in binary, twos; in hexadecimal, sixteens. Beyond the names, the underlying arithmetic is identical.

Why programmers care

Computers store everything in binary, but binary is unwieldy for humans — the byte 0xCAFE is much easier to read than 1100101011111110. Hexadecimal compresses every nibble (4 bits) into a single digit, giving us memory addresses, colour codes (#FF0000 is pure red), and machine code listings. Octal had a similar role in older systems and still appears in Unix file permissions.

Bases above 16

This calculator supports bases up to 36, which lets you write a number using all ten digits and all 26 letters of the alphabet. Base 36 shows up in compact identifier schemes like base36 user IDs and short URL codes. Above 36 the convention breaks down because you run out of single-character digits.