Binary converter

This binary converter changes numbers between binary, octal, decimal and hex, or turns text into binary and back.

Mode
Input base

How the binary and hexadecimal converter works

Number mode reads your value in the base you choose and shows it in all four bases, with no size limit.

Text mode encodes each character as UTF-8 bytes and writes every byte as 8 bits. English letters take one byte and Arabic letters take two.

0 to 15 in binary and hex

DecimalBinaryHex
000000
100011
200102
300113
401004
501015
601106
701117
810008
910019
101010A
111011B
121100C
131101D
141110E
151111F

Questions and answers

How do I convert binary to decimal?

Each binary digit stands for a power of 2, counted from the right: 1, 2, 4, 8 and so on. Add the values where the digit is 1. For example, 1011 is 8 + 2 + 1 = 11.

How do I convert text to binary, or binary to text?

Switch to Text, choose Text to binary or Binary to text and type. Each character becomes one or more 8-bit bytes in UTF-8.

Can I paste numbers with prefixes like 0x or 0b?

Yes. A prefix that matches the chosen base is ignored, as are spaces, commas and underscores.