ToolNimba

๐Ÿ”ข ASCII to Binary Converter with Steps

Shihab Mia By Shihab Mia ยท Updated 2026-07-18

Type or paste any text. Each character becomes its binary code (padded to 8 bits for standard bytes).

Binary output
01001000 01101001
Characters
2
Bytes
2
Total bits
16
Separator
Space
Per-character binary breakdown
Char Code Hex Binary

This ASCII to binary converter turns any text into its binary code in one step, so typing Hi gives 01001000 01101001. It reads each character, looks up its numeric code point, and writes that number in base 2, padded to a standard 8-bit byte. You also get a per-character table of codes, the total bit count, and the byte count, and everything runs privately in your browser.

What is the ASCII to Binary Converter?

ASCII (American Standard Code for Information Interchange) assigns every basic character a number from 0 to 127: the letter A is 65, a lowercase a is 97, the digit 0 is 48, and a space is 32. Modern text uses Unicode, which keeps those same numbers for the first 128 characters and adds many thousands more. Converting text to binary means taking each character code and rewriting it in base 2, the number system computers actually store, where every digit (a bit) is either 0 or 1.

A single byte holds 8 bits and can represent 256 values (0 to 255), which is why standard ASCII and Latin-1 characters are almost always shown as 8-bit binary. To reach 8 digits, shorter binary numbers are padded on the left with zeros. The capital H has code 72; in base 2 that is 1001000, only 7 digits, so it is padded to 01001000. The lowercase i has code 105, which is 1101001, padded to 01101001. Joined with a space you get 01001000 01101001, the binary for Hi.

To do this by hand, first find each character code from an ASCII table. Then convert that decimal number to binary by repeatedly dividing by 2 and reading the remainders from bottom to top, or by subtracting the largest fitting power of 2 (128, 64, 32, 16, 8, 4, 2, 1) and marking a 1 wherever a power fits. For H = 72, the powers that fit are 64 and 8 (64 + 8 = 72), so bits sit under the 64 and 8 places: 01001000. Finally pad each result to 8 bits and separate the groups so each byte stays readable.

Characters beyond code 255, such as accented letters in some encodings or emoji, need more than one byte in real storage, but as a plain number their code point can be longer than 8 bits. This converter pads standard bytes (codes under 256) to 8 bits and prints the minimum bits needed for anything larger, so the binary you see always matches the exact code point of each character you enter.

When to use it

  • Converting a word or phrase to 8-bit binary for a computer science homework or exam question.
  • Generating binary text for a puzzle, escape room, geocache, or hidden message.
  • Teaching how characters map to ASCII codes and then to bits, with a live per-character table.
  • Preparing sample binary data to test a binary to text decoder or a parsing script.

How to use the ASCII to Binary Converter

  1. Type or paste your text into the input box, or tap one of the example buttons.
  2. Read the binary output at the top; it updates instantly as you type.
  3. Pick a separator (space, none, or comma) to match the format you need.
  4. Check the per-character table for each code and byte, then use Copy to grab the binary.

Formula & method

For each character, binary = its code point written in base 2, padded to 8 bits when the code is under 256. The code point comes from the ASCII or Unicode table (A = 65, a = 97, space = 32). Example: H has code 72 = 64 + 8 = 1001000, padded to 01001000; i has code 105 = 64 + 32 + 8 + 1 = 1101001, padded to 01101001.
Text Hi to BinaryHicode 72code 105010010000110100101001000 01101001

Worked examples

Convert the text Hi to binary.

  1. Look up each character code: H = 72, i = 105.
  2. Convert 72 to base 2: 64 + 8 = 1001000 (7 bits).
  3. Pad to a full byte: 01001000. For 105: 64 + 32 + 8 + 1 = 1101001, padded to 01101001.
  4. Join the two bytes with a space separator.

Result: Hi in ASCII equals 01001000 01101001 (2 characters, 2 bytes, 16 bits).

Convert the letter A to binary.

  1. Find the ASCII code for A: 65.
  2. Break 65 into powers of 2: 64 + 1 = 1000001.
  3. That is 7 bits, so pad on the left to 8 bits.
  4. The single byte is complete.

Result: A in ASCII equals 01000001 (1 character, 1 byte, 8 bits).

Common characters with their ASCII code, hex, and 8-bit binary

CharacterASCII codeHexBinary (8-bit)
space322000100000
0483000110000
9573900111001
A654101000001
H724801001000
Z905A01011010
a976101100001
i1056901101001
z1227A01111010

Bit place values inside a single 8-bit byte

Bit position (from right)Power of 2Place value
02 to the 01
12 to the 12
22 to the 24
32 to the 38
42 to the 416
52 to the 532
62 to the 664
72 to the 7128

Common mistakes to avoid

  • Forgetting to pad to 8 bits. The code for H is 72, which is 1001000 in raw binary, only 7 digits. A standard byte needs 8 bits, so it must be padded to 01001000. Leaving off the leading zero breaks byte alignment and confuses decoders.
  • Mixing up uppercase and lowercase codes. A is 65 but a is 97, a difference of 32. Uppercase and lowercase letters have separate ASCII codes, so B (66) and b (98) produce different binary. Always match the exact case of your text.
  • Confusing a digit character with its numeric value. The character 0 is not code 0; it is ASCII 48 (00110000). Text digits have their own codes from 48 to 57, so the string 42 is not the number 42 in binary. This tool encodes the characters you type.
  • Dropping the space between bytes. Without a separator, 0100100001101001 is one long stream that is hard to split back into characters. Keeping a space (or comma) between each 8-bit group makes the binary readable and safe to decode.

Glossary

ASCII
A character encoding that maps 128 basic characters (letters, digits, punctuation, control codes) to the numbers 0 through 127.
Binary
A base 2 number system using only 0 and 1, where each position is worth twice the position to its right. It is how computers store data.
Bit
A single binary digit, either 0 or 1, and the smallest unit of data in computing.
Byte
A group of 8 bits. One byte can represent 256 values (0 to 255), enough for every standard ASCII or Latin-1 character.
Code point
The numeric value assigned to a character by ASCII or Unicode, such as 72 for H. It is the number that gets converted to binary.
Padding
Adding leading zeros so a binary number reaches a fixed width, here 8 bits, keeping every byte the same length and aligned.

Frequently asked questions

How do you convert ASCII to binary?

Take each character code (A = 65, a = 97) and write that number in base 2, then pad it to 8 bits with leading zeros. For example H is 72, which becomes 01001000. Join the bytes with a space to keep them readable.

What is Hi in binary?

The text Hi is 01001000 01101001 in binary. H has ASCII code 72 (01001000) and i has code 105 (01101001), each padded to a full 8-bit byte.

What is the letter A in binary?

The capital letter A is 01000001 in binary. Its ASCII code is 65, which is 64 + 1, giving 1000001 padded to 8 bits as 01000001.

Why is ASCII binary 8 bits long?

A byte is 8 bits and can hold 256 values, more than enough for the 128 ASCII characters and the 256 extended Latin-1 set. Padding every code to 8 bits keeps each character the same width and easy to decode.

Is a text digit the same as its number in binary?

No. The character 0 has ASCII code 48 (00110000), not code 0. Text digits use codes 48 to 57, so this tool encodes the digit characters you type, not their numeric values.

Does this converter work for spaces and symbols?

Yes. Every character has a code, so a space is 32 (00100000) and an exclamation mark is 33 (00100001). Punctuation and symbols convert to binary exactly like letters do.