Number Base Converter

Binary, octal, decimal, hex and any base from 2 to 36

Decimal
–
Binary
–
Hexadecimal
–
Octal
–
–

How to convert between number bases

  1. Type a number and choose its base: binary, octal, decimal, hexadecimal, or any base from 2 to 36.
  2. The number is shown instantly in decimal, binary, hexadecimal and octal, plus a base of your choice.
  3. Copy any result. Spaces in binary and commas in decimal are only for readability and are removed when copying.

Prefixes such as 0x, 0b and 0o are accepted, as are spaces and underscores between digits. Negative numbers are converted with a minus sign. There is no size limit: numbers with hundreds of digits are handled exactly using JavaScript's BigInt.

How positional number systems work

In base 10, each digit is worth ten times the digit to its right: 255 = 2×100 + 5×10 + 5×1. Other bases work the same way with a different multiplier. In binary (base 2) each place is a power of two, so 11111111 = 128+64+32+16+8+4+2+1 = 255. Hexadecimal (base 16) uses the digits 0–9 and A–F for ten to fifteen, so 255 is FF. Because 16 = 2⁴, every hex digit maps to exactly four binary digits, which is why programmers use hex as shorthand for binary: colors (#FF8800), memory addresses and byte values. Octal groups three bits per digit and survives mainly in Unix file permissions such as 755.

To convert from decimal by hand, divide repeatedly by the target base and read the remainders from bottom to top. Bases above 10 use letters, up to Z for 35 in base 36.

What is 255 in binary and hex?

11111111 in binary and FF in hexadecimal: the largest value of one byte.

Can I convert negative numbers?

Yes, with a minus sign. Computers usually store negatives in two's complement, which depends on the bit width; the tool shows how many bits you need.

What does base 36 look like?

It uses 0–9 then A–Z, so it is the most compact base that only uses letters and digits. It is used for short IDs and URL shorteners.

Made by BufferMint. We also design and build software products for founders. See our services →

Your files and inputs never leave your device; we only count anonymous visits.