Number Base Converter

Type a number in any base and see it in binary, octal, decimal and hexadecimal at once — plus any custom base up to 36. Works with numbers of any length, not just 32 or 64 bits.

Runs entirely in your browser. Nothing you enter is uploaded or stored.

How to convert between bases

  1. Type a number and choose the base it's written in. Prefixes are understood: 0x for hex, 0b for binary, 0o for octal. Spaces and underscores used as separators (1111_0000) are ignored.
  2. The same value appears in binary, octal, decimal and hexadecimal, plus one extra base of your choice (2–36).
  3. Click Copy next to any result.

The converter uses arbitrary-precision integers (JavaScript BigInt), so a 128-bit UUID, a 256-bit hash or a 40-digit decimal number converts exactly — no rounding as with ordinary calculators.

Number bases explained

A base (or radix) is how many different digits a number system uses. Each position is worth the base times the position to its right. In decimal, 255 = 2×100 + 5×10 + 5×1. In binary, the same value is 11111111 = 128+64+32+16+8+4+2+1.

DecimalBinaryOctalHex
0000
91001119
10101012A
15111117F
16100002010
25511111111377FF
1024100000000002000400
655351111111111111111177777FFFF

Hexadecimal is popular in computing because one hex digit is exactly 4 bits, so a byte is always two hex digits. Octal survives mainly in Unix file permissions — see the chmod calculator. Base 36 (0–9 plus A–Z) is used for short IDs and URL shorteners.

Negative numbers

Negative numbers are shown with a minus sign in every base (−255 = −FF). Computers usually store negative integers in two's complement form instead, where the bit pattern depends on the integer size (−1 is FF as an 8-bit value but FFFFFFFF as a 32-bit one). To get the two's complement of −N for an n-bit type, convert 2n − N: for −1 in 8 bits, convert 256 − 1 = 255 → 11111111.

Frequently asked questions

How do I convert binary to decimal by hand?

Multiply each digit by its place value (1, 2, 4, 8, 16… from the right) and add them up. 1011 = 8 + 0 + 2 + 1 = 11.

How do I convert decimal to hexadecimal?

Divide by 16 repeatedly and write down the remainders (10–15 become A–F), then read them from last to first. 255 ÷ 16 = 15 remainder 15 → FF.

Is there a size limit?

No practical limit — numbers with thousands of digits convert exactly, because the tool uses arbitrary-precision integers instead of floating point.

Can it convert fractions like 0.1?

No, it converts whole numbers only. Fractions often have no exact representation in another base (0.1 in binary repeats forever).