Number base converter

Type a number in any field, binary, octal, decimal, hex or a custom base up to 36, and the others update instantly. Very large numbers are supported.

Private: works in your browser, nothing is uploaded.

How to use the Number Base Converter tool

  1. Type a number into any field.
  2. Read the same value in all other bases.
  3. Copy the value you need. Prefixes like 0x and 0b are accepted.

How positional number systems work

In base 10, each position is worth ten times the one to its right: 345 is 3×100 + 4×10 + 5. Binary works the same way with powers of two: 1011 is 8 + 0 + 2 + 1 = 11. Hexadecimal uses sixteen digits, 0 to 9 and A to F, so one hex digit represents exactly four bits and two hex digits represent one byte. That is why programmers and network engineers use hex for memory addresses, colors (#FF8800), MAC addresses and IPv6.

Where you need each base

  • Binary: subnet masks, bit flags, permissions and understanding how computers store data.
  • Octal: Unix file permissions such as 755 and 644.
  • Hexadecimal: colors, memory addresses, MAC and IPv6 addresses, byte dumps.
  • Base 36: short IDs and URL shorteners, using digits and letters.

Large numbers

The converter uses arbitrary-precision integers, so it handles values far beyond the 2^53 limit where ordinary JavaScript numbers lose precision. It also shows how many bits and bytes a number needs and, for small values, which Unicode character it corresponds to. All calculations run in your browser. Nothing you enter is sent anywhere.

Quick reference

  • Decimal 255 = binary 11111111 = hex FF = octal 377.
  • Decimal 1024 = binary 10000000000 = hex 400.
  • Unix permission 755 (octal) = rwxr-xr-x = binary 111 101 101.
  • Subnet mask 255.255.255.0 = 24 ones in binary.

Converting in code

Most languages convert with one call: in Python int("ff", 16) and hex(255); in JavaScript parseInt("ff", 16) and (255).toString(16). For very large numbers in JavaScript, use BigInt, for example BigInt("0x" + hex).

Frequently asked questions

How do I convert binary to decimal by hand?

Multiply each digit by its power of two and add them up. 1101 = 8 + 4 + 0 + 1 = 13.

Why is hex used so often?

One hex digit is exactly four bits, so long binary values become short and readable.

Does it support negative numbers?

Yes, written with a minus sign. It does not show two’s-complement encodings.

Are fractions supported?

No, only whole numbers.

Is my number sent anywhere?

No. The conversion runs in your browser.

What is base 36 used for?

It uses digits and all letters, which makes short, case-insensitive IDs, for example in URL shorteners.