Binary Encoder/Decoder

Encode text to binary or decode binary back to text


1. What is Binary?

Binary is a base-2 number system that uses only two digits: 0 and 1. In computers, text is stored as binary data where each character is represented by 8 bits (1 byte).

2. How does it work?

Binary encoding converts text characters to their ASCII/Unicode numeric values, then represents each number in base-2 (binary). Each character becomes an 8-bit byte. For example, 'A' has ASCII value 65, which is 01000001 in binary. Decoding reverses this process by converting 8-bit chunks back to characters.

3. Examples

Encode simple text

Hello → 01001000 01100101 01101100 01101100 01101111

Encode single character

A01000001

Decode binary

01001000 01101001 → Hi

References