Number Base Converter

Convert any integer between binary, octal, decimal, hexadecimal and every base from 2 to 36.

  • Bases 2–36
  • Exact BigInt math
  • Two’s complement

Convert between bases

Any size works (BigInt arithmetic). Spaces and underscores are ignored, a minus sign is allowed, and 0x, 0b and 0o prefixes are accepted.

Enter a number to convert.

How it works

The input is read digit by digit in the source base (value = value × base + digit) into an arbitrary-precision integer, so there is no rounding even for hundreds of digits. It is then written out in the target base by repeated division.

The result lists binary, octal, decimal and hexadecimal side by side, grouped for easier reading, along with the bit and byte length. For negative numbers the two’s-complement bit pattern is shown for 8, 16, 32 and 64 bits where it fits.

Digits in bases above 10

After 0–9 the letters continue the digits: A = 10, B = 11 … F = 15 in hexadecimal, up to Z = 35 in base 36. Upper and lower case mean the same.

DecimalBinaryOctalHex
0000
1111
21022
711177
81000108
10101012A
15111117F
16100002010
100110010014464
25511111111377FF
256100000000400100

Tips

  • One hex digit is exactly four bits and one octal digit is three, which is why programmers use them as shorthand for binary.
  • Unix file permissions such as 755 are octal: 7 = rwx, 5 = r-x.
  • Base 36 (0–9 plus A–Z) is handy for short IDs: 1,000,000 is LFLS.

Standards and sources

Last reviewed October 17, 2026

Frequently asked questions

How do I convert decimal to binary?

Divide by 2 repeatedly and read the remainders from last to first. 13 ÷ 2 gives remainders 1, 0, 1, 1, so 13 is 1101. The converter does this instantly for any size.

How do I convert hex to decimal?

Multiply each digit by a power of 16 and add them up. FF = 15 × 16 + 15 = 255.

Is there a size limit?

Numbers are handled with JavaScript BigInt, so there is no precision limit. To keep the page responsive, input is capped at 4,096 digits.

Can it convert fractions?

No, it converts whole numbers only. Fractional parts often do not end in another base (0.1 in decimal repeats forever in binary).

Related tags

Other tools

Results are for reference only. Calculations may be wrong and are not legal, medical or financial advice. Always confirm with the relevant authority or a professional before important decisions.

Search