ASCII Code to Binary Converter

codecode
2⁷2⁶2⁵2⁴2⁰
65
65
01000001

Show the working for binary → ascii

This converter works on code values, one at a time, from the table. Codes run from 0 to 127; anything above that is reported as out of range. For whole text rather than single codes, use Text to Binary; for a plain number, use Decimal to Binary.

Going the other way? Convert binary back to ASCII code

How do you convert ASCII to binary?

ASCII Code to binary conversion takes one code value from the 0–127 table and writes that number in binary, padded to 8 digits so every code is the same width.

In short

ASCII code 65 (the letter A) is binary 01000001. Take the ASCII code from the table, convert the number to base 2, and pad it with leading zeros to 8 bits.

  1. Read the code value. This example uses 65.
  2. Convert the number to binary: 65 is 1000001.
  3. Pad it on the left to 8 digits: 01000001.
  4. Repeat for every code in the list and separate them with a single space: 65 = 01000001.

ASCII Code to Binary Conversion Table

The codes this page works through, each with the character it stands for and the same value in hex, octal and binary. Find the code in the first column and read across; the row is the whole conversion. Codes 0 to 31 and 127 have no glyph, so the Char column shows their short name instead. This page shows the rows you need; ASCII code chart (decimal, hex, octal, binary) carries all 128.

ASCII Code to Binary Conversion Table
DecCharHexOctBin
10LF0A01200001010
13CR0D01500001101
32(space)2004000100000
33!2104100100001
4803006000110000
5793907100111001
65A4110101000001
72H4811001001000
90Z5A13201011010
97a6114101100001
122z7A17201111010
127DEL7F17701111111

The base this page writes, defined by the digits it uses, how a value is marked, and what each position is worth.

Base reference
BaseRadixDigits PrefixPlace worthTypical range
Binary20, 1 0b2ⁿ8-bit byte 0–255 (00000000–11111111); 4-bit nibble 0–15; 16/32/64-bit words

Worked Example: 65 to Binary

One code value, taken from the table and written out in full. This is the same working the converter shows when you turn on "show steps".

codecode
2⁷2⁶2⁵2⁴2⁰
65
65
01000001

Result: 65 = 01000001

Start with the code itself: 65. The table gives one row per code from 0 to 127, and that row is the whole answer — there is no arithmetic to get wrong, only a row to find. Reading the row across gives the same value in every base the table carries.

Writing 65 in binary gives 1000001, and the converter pads it on the left to 8 digits: 01000001. The padding is not decoration. It keeps every code the same width, so a run of codes can be split apart again later without a separator to guide it. A code typed in a different base lands on the same row, which is what the base selector is for.

Check it in reverse

The value looks the same read backwards. 01000001 maps to code 65, and code 65 maps to 65 — the table is a two-way lookup, not a calculation, so no rounding or padding can change the answer. To verify the result by hand, convert the binary bytes back to ASCII codes and compare it with the code you started from.

Worked examples: ASCII code to binary

Each example gives the value first, then the working. Click a value to load it in the converter.

What is ASCII code 65 in binary?

ASCII code 65 is 01000001 in binary.

Method: code 65 written in binary is 01000001.

Load this value in the converter

What is ASCII code 97 in binary?

ASCII code 97 is 01100001 in binary.

Method: code 97 written in binary is 01100001.

Load this value in the converter

What is ASCII code 72 in binary?

ASCII code 72 is 01001000 in binary.

Method: code 72 written in binary is 01001000.

Load this value in the converter

What is ASCII code 32 in binary?

ASCII code 32 is 00100000 in binary.

Method: code 32 written in binary is 00100000.

Load this value in the converter

What is ASCII code 48 in binary?

ASCII code 48 is 00110000 in binary.

Method: code 48 written in binary is 00110000.

Load this value in the converter

What is ASCII code 33 in binary?

ASCII code 33 is 00100001 in binary.

Method: code 33 written in binary is 00100001.

Load this value in the converter

What is ASCII code 90 in binary?

ASCII code 90 is 01011010 in binary.

Method: code 90 written in binary is 01011010.

Load this value in the converter

What is ASCII code 122 in binary?

ASCII code 122 is 01111010 in binary.

Method: code 122 written in binary is 01111010.

Load this value in the converter

What is ASCII code 57 in binary?

ASCII code 57 is 00111001 in binary.

Method: code 57 written in binary is 00111001.

Load this value in the converter

What is ASCII code 10 in binary?

ASCII code 10 is 00001010 in binary.

Method: code 10 written in binary is 00001010.

Load this value in the converter

What is ASCII code 13 in binary?

ASCII code 13 is 00001101 in binary.

Method: code 13 written in binary is 00001101.

Load this value in the converter

What is ASCII code 127 in binary?

ASCII code 127 is 01111111 in binary.

Method: code 127 written in binary is 01111111.

Load this value in the converter

Every example above reverses exactly — look the same bytes up as ASCII codes.

What Changes the Code Output?

Values above 127

A value above 127 is out of range and the converter says so rather than guessing. Codes 128–255 belong to extended sets such as Latin-1, not to ASCII, so there is no single right character for them. every ASCII code and its character lists every code that is in range.

Which base the code is written in

The same code can be typed as decimal, hex, octal or binary, and the base selector says which one you mean. 65, 41, 101 and 01000001 are all the letter A. Pick the wrong base and you look up a different row.

Control codes and printable codes

Codes 32 to 126 are printable characters; 0–31 and 127 are control codes. A control code has no glyph, so the table shows its short name instead — 10 is LF, 13 is CR. Converting one is valid; displaying one is not.

One code or a list

Several codes separated by spaces convert as a list, in order, and each keeps its own row. The separator is a display choice and does not change any value.

ASCII Code to Binary in Code

The same rule in one line. Both take code values and return their binary form.

Python: ' '.join(format(b, '08b') for b in s.encode('utf-8'))
JavaScript: [...new TextEncoder().encode(s)].map(b => b.toString(2).padStart(8, '0')).join(' ')

Common Mistakes

Frequently Asked Questions

What is the ASCII to binary table?

The table above: one row for every code from 0 to 127, each with its 8-digit binary form. ASCII defines 128 characters, codes 0–127, using 7 bits; in practice each code is stored in one 8-bit byte with a leading 0.

Is ASCII just binary?

No. ASCII is a table of 128 code values; binary is one way of writing them, on the digit set 0, 1 with each place worth 2ⁿ. 65 in binary is 01000001, in hex 41, in octal 101 — the same ASCII code every time.

Do you need the ASCII table to convert a code to binary?

No. A code is a number: divide by 2 and read the remainders. Looking it up is quicker, and the table marks the limit. Codes 128–255 are not part of ASCII. They belong to extended sets such as Latin-1 (ISO 8859-1), where 255 is ÿ; in pure ASCII a value above 127 is out of range.

Every code here reads back the same way: the same value converts straight back in the binary to ASCII direction.

The rest of the family sits on pick another conversion from the grid.