DO IT EASY APP
English

Number base converter

Convert between binary, octal, decimal and hexadecimal. Any base from 2 to 36, and huge numbers work too.

  • No sign-up, no fees.
  • Convert between binary, octal, decimal and hexadecimal.
  • Any base from 2 to 36.
  • Numbers hundreds of digits long convert without rounding.
  • 0x, 0b, 0o prefixes and spaced writing are read.
  • What you type is processed, but never shared with anyone.

Binary to decimal: how to use the Number Base Converter

Did homework ask "what is 1011 in binary?" Four steps:

  1. Pick the input base. As the Input base, pick one of 2, 8, 10, 16, or type your own base in the Other base (2-36) box.
  2. Type the number. Type the number in the Number box; the title of the box shows which base you're writing in.
  3. See the equivalents. Below you get the equivalent in every base. Take the one you want with Copy.
  4. Add another base. If you type the base you want in the Other base box, it's added to the list too.

What is base conversion?

A number base shows how many different digits we use when writing a number. In daily life we use base ten (0-9). Computers work in binary (only 0 and 1), because an electrical circuit tells two states (on-off) apart. Programmers use hexadecimal (0-9 and A-F) to make binary numbers easier to read. What people search for as binary to hex, binary to decimal or base conversion is writing the same number in different bases: 255 in decimal is 11111111 in binary and FF in hexadecimal.

What does it read?

  • Letters: digits above 10 are written as letters: A = 10, B = 11, … Z = 35. Case doesn't matter.
  • Prefixes: the 0x (hexadecimal), 0b (binary) and 0o (octal) prefixes are dropped if they match the base you picked.
  • Spaces and underscores: you can write 1111 0000 or 1_000.
  • A minus sign: negative numbers are written like -ff.

Very big numbers and errors

Numbers are processed with full precision; even numbers hundreds of digits long are converted without rounding. Decimal fractions aren't supported, only whole numbers. If you type a digit that doesn't exist in the base you picked, it says which character is the problem; for example, if you type 102 in binary, the 3rd character 2 is invalid.

Where do binary, hexadecimal and octal appear?

  • In binary, each digit is 1 bit; 8 digits make 1 byte.
  • In hexadecimal, 2 digits correspond to exactly 1 byte. That's why color codes (#FF8800) and memory addresses are hexadecimal.
  • In octal, file permissions (755) are written.

A tip for converting by hand: repeatedly dividing a decimal number by the target base and writing the remainders from last to first gives the binary equivalent; if you divide 13 by 2, the remainders come out 1, 0, 1, 1 and the result is 1101.

Common mistakes

  • Mixing up letters: in hexadecimal, the letter B is 11; in binary there's no such digit.
  • Forgetting to pick the base: if you type 10 without saying which base you wrote it in, the result will be wrong; first pick the input base.

To convert color codes there's Color converter, for Roman numerals Roman numeral converter, for the reading of numbers Number to words, and for digest values Hash generator.

Frequently asked questions

Is the number base converter free?

No cost at all. Not bad, right?

Is what I type sent anywhere?

The conversion happens in your browser. What you type is processed, but never shared with anyone.

How are negative numbers shown in binary?

The sign is written separately here: the binary of -10 is -1010. Computers' two's complement representation isn't in this tool.

What is base 36 for?

It's the largest base that can be written with 0-9 and A-Z. It's used for producing short IDs or short links.

How do I convert a binary number to decimal?

Pick 2 as the input base, type the binary number; the decimal equivalent appears below. By hand: multiply each digit by a power of 2 and add.

How much is hexadecimal FF?
Can I convert decimal numbers with fractions?

No, only whole numbers. To turn decimals into fractions there's Decimal ↔ fraction.

Can I use it on my phone?

Yes. Pick the base and type the number; the results show one under the other.

Why are bases 2, 8, 10 and 16 so common?

Binary is the computer's natural language. Octal and hexadecimal are ways of writing binary numbers short: three binary digits correspond to one octal digit, four to one hexadecimal digit. That's why writing FF instead of 11111111 is both shorter and less error-prone.

How do I check a binary, decimal, hexadecimal conversion by hand?

Try converting the result back: if the decimal 255 came out as FF, set the input base to 16 and type FF; you should see 255 again.

Why are file permissions in octal written like 755?

Each digit corresponds to three binary digits (read, write, execute); 7 means all are on, 5 means read and execute are on.

Related tools