Binary Converter

Binary Converter

Convert between binary, decimal, hexadecimal and octal instantly — right in your browser.

This value is in

Everything runs in your browser. Nothing you type is sent anywhere.

How to use the binary converter

This binary converter changes a number from one base to another in a single keystroke. You do not need to sign up or download anything, and everything runs in your browser, so the numbers you type never leave your device.

  1. Type the number. Enter the value you want to convert in the box at the top. It can be a binary, decimal, hexadecimal or octal number.
  2. Choose its base. Tell the converter which base your number is in — Binary, Decimal, Hexadecimal or Octal — by tapping the matching button.
  3. Read the answers. The same value appears at once in all four bases, and each result has a Copy button so you can paste it somewhere else.

The results update live with every keystroke, so you can change the number or switch the base and see the new values straight away. If the box is empty, nothing is shown yet. If a digit does not belong to the chosen base — for example, a 2 in a binary number — the converter tells you plainly instead of guessing.

Worked examples: decimal 42 and hexadecimal FF

Take the decimal number 42. Choose Decimal as the source base and type 42. The converter shows binary 101010, hexadecimal 2A and octal 52. To check it by hand: 32 plus 8 plus 2 is 42, and those are the places where binary 101010 has a 1. For hexadecimal, 42 is two sixteens (32) with 10 left over, and 10 in hex is A — so the answer is 2A, and 2 times 16 plus 10 is 42. For octal, 42 is five eights (40) with 2 left over, so the answer is 52.

Now take the hexadecimal number FF. Choose Hexadecimal and type FF. The converter shows decimal 255, binary 11111111 and octal 377. That is easy to check: F is 15, so FF is 15 times 16 plus 15, which is 240 plus 15, or 255. Eight 1s in binary is also 255, and 377 in octal is 3 times 64 plus 7 times 8 plus 7, which is 192 plus 56 plus 7 — 255 again.

What each number base is

Binary is base 2 and uses only the digits 0 and 1. It is the native language of computers: every bit of data a computer stores is a pattern of ones and zeros, and every file, image and program is binary underneath. Decimal is base 10, the system we use every day, with the digits 0 to 9. Hexadecimal is base 16, using the digits 0 to 9 and the letters A to F for the values 10 to 15. Programmers use it as a compact shorthand for binary — one hex digit stands for exactly four binary digits — so it appears in colour codes, memory addresses and error codes. Octal is base 8, using the digits 0 to 7. It is less common now, but it still appears in file permissions on Unix systems, where each digit stands for three binary digits.

Frequently asked questions

What is binary?

Binary is a number system that uses only two digits, 0 and 1. Each position in a binary number is worth twice the one to its right, so binary 1010 is 8 plus 0 plus 2 plus 0, which is 10 in decimal. Computers use binary because their circuits have two states — on and off — which map naturally onto 1 and 0.

How do you convert decimal to binary?

Divide the decimal number by 2 again and again, and write down the remainders. When you reach zero, read the remainders from the last one to the first. For 42: 42 divided by 2 is 21 with remainder 0, 21 divided by 2 is 10 with remainder 1, 10 divided by 2 is 5 with remainder 0, 5 divided by 2 is 2 with remainder 1, 2 divided by 2 is 1 with remainder 0, and 1 divided by 2 is 0 with remainder 1. Reading the remainders backwards gives 101010. This converter does the same work instantly.

What is hexadecimal used for?

Hexadecimal is used as a shorter way to write binary, mostly in programming. Web colours use hex — for example, #FF0000 is bright red — and memory addresses, error codes and data in code editors are often shown in hex. Because one hex digit equals four binary digits, long binary numbers become much shorter in hex.

Why do programmers use binary and hex?

Computers store everything as binary, so programmers need to read and write binary values. Hexadecimal is simply a compact way to do that: it keeps the numbers readable and short while matching binary exactly, four bits at a time. Decimal is for people; binary is for machines; hex is the bridge between the two.

Is my input stored or sent anywhere?

No. Everything runs in your browser — the conversion happens on your own device, and nothing you type is sent to a server or stored. You can convert sensitive values such as keys and codes with confidence.

This binary converter works with whole numbers of up to 32 digits. Longer numbers are refused with a plain message, so you always know where you stand.

Scroll to Top