Binary, Decimal & Hex Converter

Type a number in any base and see it in the others. There is also a text to binary and hex converter below.


Binary
Hex

How to use this tool

  1. Type a number into any of the four boxes.
  2. The other boxes update with the same value in their base.
  3. For text, type in the lower box to see each character as binary and hex bytes (UTF-8).

How number bases work

Decimal uses ten digits and place values that are powers of 10. Binary uses only 0 and 1, with place values 1, 2, 4, 8, 16 and so on. Hexadecimal uses 0–9 and A–F for ten to fifteen, with place values that are powers of 16. Octal uses 0–7.

DecimalBinaryHex
501015
101010A
151111F
161 000010
2551111 1111FF

Where you see them

Hex appears in web colour codes (#0D6B57), memory addresses and MAC addresses. Binary underlies everything a computer stores. Students meet both in computer science and digital electronics courses.

Text to binary

Each character is turned into bytes using UTF-8. Plain English letters take one byte each: "H" is 01001000 (hex 48). Accented letters, Urdu, Hindi and emoji take two to four bytes.

Frequently asked questions

How do I convert binary to decimal?

Add the place values where there's a 1. 1101 = 8 + 4 + 0 + 1 = 13.

How do I convert decimal to hex?

Divide by 16 repeatedly and write the remainders as hex digits from the last to the first. 255 is FF.

What is 1010 in decimal?

10.

Is there a size limit?

No practical limit. The converter uses big integers, so very long numbers work.

Sources and references

  1. Khan Academy: Number systems (binary and hexadecimal)
  2. MDN Web Docs: Number.prototype.toString radix

Last reviewed by the Everyday Toolnest team. How we check our tools. Results are for general information; for legal, tax, medical or financial decisions, check with a qualified professional.

More converters

Also useful