Number Base Converter

Convert integers between binary, octal, decimal, hexadecimal and any base from 2 to 36. Enter a value, choose its base, and every other base updates instantly. Arbitrary-size integers are supported (exact, no rounding).

What is a number base?

A number base — or radix — is how many distinct digits a positional number system uses. Base 10 (decimal) uses ten digits, 0–9; base 2 (binary) uses only 0 and 1. In every base each position is worth the base raised to a power, so the binary number 1011 means 1×8 + 0×4 + 1×2 + 1×1 = 11 in decimal.

The four common bases

  • Binary (base 2) is the native language of computers: every bit is 0 or 1, matching a circuit's off/on state.
  • Octal (base 8) packs three bits into one digit and was long used for Unix file permissions such as 755.
  • Decimal (base 10) is the everyday human system, using the ten digits 0–9.
  • Hexadecimal (base 16) is a compact way to write binary — one hex digit equals four bits, so a byte is exactly two hex digits (FF = 255). It is used for colours, memory addresses and byte dumps.

How to convert between bases

  • Decimal to binary: divide by 2 repeatedly and record each remainder, then read them bottom to top. 13 becomes 1101.
  • Binary to decimal: multiply each digit by its place value (…8, 4, 2, 1) and add. 1101 becomes 8 + 4 + 0 + 1 = 13.
  • Hexadecimal to binary: convert one hex digit at a time into four bits. FF becomes 1111 1111, and 2A becomes 0010 1010.

Number base conversion table

Common decimal values shown in binary, octal and hexadecimal.

Decimal Binary Octal Hex
0000
1111
21022
31133
410044
510155
611066
711177
81000108
91001119
10101012A
11101113B
12110014C
13110115D
14111016E
15111117F
16100002010
321000004020
64100000010040
100110010014464
1281000000020080
25511111111377FF
256100000000400100
51210000000001000200
1024100000000002000400

Powers of two

Power Decimal value Hex
2011
2122
2244
2388
241610
253220
266440
2712880
28256100
29512200
2101024400
2166553610000
2201048576100000
230107374182440000000
2324294967296100000000

Frequently asked questions

What bases can I convert between?

Any base from 2 to 36. Digits 0-9 then a-z represent values 0 to 35, so base 16 uses 0-9 and a-f, and base 36 uses 0-9 and a-z.

Is there a size limit on the number?

No. Conversion uses arbitrary-precision integers, so very large values (hundreds of digits) convert exactly without rounding or overflow.

How do I convert decimal to binary by hand?

Repeatedly divide the decimal number by 2 and record each remainder; reading the remainders from last to first gives the binary representation.

Why do computers use binary?

Digital circuits have two stable states — off and on — that map directly to 0 and 1, making binary the most reliable way to store and process data electronically.

What is hexadecimal used for?

Hexadecimal is a human-friendly shorthand for binary: colours (#FF9E0B), memory addresses, MAC addresses and byte-level data are almost always written in hex, because one hex digit maps to exactly four bits.

How many digits does base 36 use?

Base 36 uses 0–9 followed by a–z — thirty-six symbols in total — which is the largest base this tool supports with the standard alphanumeric digit set.