Number Base Converter

Type a number in any base and see the other three instantly: decimal, binary, octal and hexadecimal. It also converts text to binary and hex, and back. Everything runs in your browser.

🔒 What you type never leaves your device. Everything is calculated in your browser.

Type in any of the four fields and the others update on their own. No size limit, and only for positive whole numbers.

Text to binary and hex

You can paste bits to turn them into text.

How to convert between binary, decimal and hex

  1. Type the number in the field for its base: decimal, binary, octal or hexadecimal.
  2. The other three fields fill in instantly.
  3. To convert text, type it in the text box and see its binary and hex.
  4. You can also paste bits or hex bytes to get back the original text.

Number bases and text in binary

Numbers can be written in different bases. Decimal uses ten digits (0 to 9), binary two (0 and 1), octal eight (0 to 7) and hexadecimal sixteen (0 to 9 and A to F). Decimal 255 is 11111111 in binary, 377 in octal and FF in hexadecimal.

To go from decimal to binary you divide by 2 again and again and read the remainders backwards; to go from binary to decimal you add up each 1 digit multiplied by its power of 2. The tool does this with whole numbers of any size, without losing precision.

Text on a computer is stored as bytes. With UTF-8 encoding, the letter A is the byte 01000001 (65 in decimal, 41 in hex) and an accented letter like é takes two bytes (C3 A9). That is why text in binary is written in groups of 8 bits per byte.

Things to keep in mind

Frequently asked questions

How do I convert decimal to binary?

Type the number in the decimal field and look at the binary field. Decimal 10 is 1010 in binary.

How do I convert text to binary?

Type the text in the text box: each character is shown as an 8-bit byte (A is 01000001).

How do I convert hex to decimal?

Type the number in the hexadecimal field. For example, FF is 255 in decimal.

What about very large numbers?

They are converted without losing precision, even with hundreds of digits.

Is what I type saved?

No. Everything is calculated in your browser.