guide

How to Convert Text to Binary Code (2026)

By Rui Barreira · Last updated: 18 June 2026

Binary code represents text using only two digits — 0 and 1. Every character you type maps to a unique 8-bit sequence called a byte. Understanding this mapping is foundational to computing: it is how your keyboard input becomes data a processor can handle, and how that data moves across networks and gets stored on disk.

How the conversion works

Each character has a numeric code defined by the ASCII standard (or Unicode for characters beyond the basic Latin alphabet). To convert text to binary, take the ASCII code for each character and express it in base-2. The letter A has ASCII code 65. In binary, 65 is 01000001. Lowercase a is 97, which becomes 01100001. To convert back, group the binary digits into 8-bit chunks, convert each group to its decimal value, then look up the corresponding character.

Common character reference

The table below shows the binary representation for frequently used characters. Uppercase and lowercase letters differ by a single bit (bit 5), which is why toggling case is an efficient operation at the hardware level.

CharacterASCII (decimal)Binary (8-bit)
A6501000001
a9701100001
Z9001011010
z12201111010
04800110000
95700111001
Space3200100000
!3300100001

Step-by-step example

To convert the word Hi to binary: first, find the ASCII values — H is 72, i is 105. Next, convert each to 8-bit binary: 72 becomes 01001000 and 105 becomes 01101001. The full binary string is 01001000 01101001. Spaces between bytes are a display convention only; the actual data is a continuous stream of bits. To reverse the process, split the stream into groups of eight, convert each group from binary to decimal, then map each decimal value back to its ASCII character.

For any string longer than a few characters, doing this by hand is tedious. Use the Binary ↔ Text Converter to convert instantly — paste text to get binary, or paste binary to decode it back to readable text.

Frequently Asked Questions

Is this tool free?
Yes — completely free, no signup required. All processing happens in your browser.
Does the tool work offline?
Once loaded, most features work without an internet connection since everything runs client-side.
More free toolsSee all 469
Merge PDFsCompress ImageJSON FormatterPassword GeneratorVAT CalculatorQR Code Generator
How to Convert Text to Binary Code (2026) | brevio