Number bases

Number base converter

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

11111111

Whole numbers of any size are supported (exact big-integer arithmetic).

Number systems

Binary

Base 2 uses only the digits 0 and 1. Every value in a computer is ultimately stored as binary; each binary digit is a bit.

Octal

Base 8 uses digits 0–7. Each octal digit represents exactly three bits, which is why octal appears in Unix file permissions (e.g. 755).

Decimal

Base 10 is the everyday number system with digits 0–9; each position is worth ten times the one to its right.

Hexadecimal

Base 16 uses 0–9 and A–F (A = 10 … F = 15). One hex digit is exactly four bits, so two hex digits describe a byte — used for colours (#FF8800), memory addresses and checksums.

Base-36

Base 36 uses 0–9 and A–Z, the most compact case-insensitive alphanumeric system; it is used for short IDs and URL shorteners.

Roman numerals

Roman numerals combine I (1), V (5), X (10), L (50), C (100), D (500) and M (1000). A smaller symbol before a larger one is subtracted (IV = 4, CM = 900). Standard numerals cover 1–3,999.

Decimal to binary table

Decimal to binary
DecimalBinary
00
11
210
311
4100
5101
6110
7111
81000
91001
101010
111011
121100
131101
141110
151111
1610000
3111111
32100000
63111111
641000000
1001100100
1271111111
12810000000
25511111111
256100000000
10001111101000
102410000000000
40961000000000000
655351111111111111111

Frequently asked questions

What number bases are supported?

Any whole-number base from 2 to 36, plus Roman numerals (1–3,999). Binary, octal, decimal and hexadecimal have shortcuts.

How large can the numbers be?

There is no fixed limit: the converter uses exact big-integer arithmetic, so long binary or hex strings are converted without rounding.

Does it handle negative numbers and prefixes?

Yes. A leading minus sign is kept, and the prefixes 0x, 0b and 0o are accepted for hex, binary and octal input.

Try “psi to bar”, “cups”, “binary” or “5 ft in cm”.