Text to ASCII Code Converter

A
65
65

ascii

Show the working for ascii → text

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 code values above 127, use Text to Decimal.

Going the other way? Convert ASCII code back to text

How do you convert text to ASCII code?

Text to ASCII code conversion reads each value as a code between 0 and 127 and looks up the character that the ASCII table gives for it.

  1. Read the first value. This example uses A.
  2. Convert it to a decimal code if it is not one already: 65.
  3. Look that code up in the table. 65 is 65.
  4. Repeat for every value and join the results: A = 65.

Text to ASCII Code 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 writes one unpadded decimal ASCII code (0–127) per character; non-ASCII flagged 'not ASCII'. This page shows the rows you need; ASCII code chart (decimal, hex, octal, binary) carries all 128.

Text to ASCII Code Conversion Table
DecCharHexOctBin
32(space)2004000100000
65A4110101000001
73I4911101001001
97a6114101100001
98b6214201100010
100d6414401100100
101e6514501100101
102f6614601100110
103g6714701100111
106j6A15201101010
108l6C15401101100
110n6E15601101110
111o6F15701101111
114r7216201110010
116t7416401110100
117u7516501110101
118v7616601110110
121y7917101111001

Worked Example: A to ASCII Code

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".

A
65
65

ascii

Result: A = 65

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.

The row gives 65 directly. Nothing is padded and nothing is rounded, so a code either has a row or it is out of range — and the converter says which. That is the difference between a lookup and a calculation, and it is why the answer here can be checked by eye against the table above.

Check it in reverse

The value looks the same read backwards. 65 maps to code 65, and code 65 maps to A — 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 ASCII codes back to characters and compare it with the code you started from.

Worked examples: text to ASCII code

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

What is I love you in ASCII code?

Text I love you is 73 32 108 111 118 101 32 121 111 117 in ASCII code.

Method: look code 73 up in the 0–127 table; the row gives 73.

Load this value in the converter

What is a in ASCII code?

Text a is 97 in ASCII code.

Method: look code 97 up in the 0–127 table; the row gives 97.

Load this value in the converter

What is A in ASCII code?

Text A is 65 in ASCII code.

Method: look code 65 up in the 0–127 table; the row gives 65.

Load this value in the converter

What is e in ASCII code?

Text e is 101 in ASCII code.

Method: look code 101 up in the 0–127 table; the row gives 101.

Load this value in the converter

What is b in ASCII code?

Text b is 98 in ASCII code.

Method: look code 98 up in the 0–127 table; the row gives 98.

Load this value in the converter

What is d in ASCII code?

Text d is 100 in ASCII code.

Method: look code 100 up in the 0–127 table; the row gives 100.

Load this value in the converter

What is f in ASCII code?

Text f is 102 in ASCII code.

Method: look code 102 up in the 0–127 table; the row gives 102.

Load this value in the converter

What is t in ASCII code?

Text t is 116 in ASCII code.

Method: look code 116 up in the 0–127 table; the row gives 116.

Load this value in the converter

What is g in ASCII code?

Text g is 103 in ASCII code.

Method: look code 103 up in the 0–127 table; the row gives 103.

Load this value in the converter

What is j in ASCII code?

Text j is 106 in ASCII code.

Method: look code 106 up in the 0–127 table; the row gives 106.

Load this value in the converter

What is n in ASCII code?

Text n is 110 in ASCII code.

Method: look code 110 up in the 0–127 table; the row gives 110.

Load this value in the converter

What is r in ASCII code?

Text r is 114 in ASCII code.

Method: look code 114 up in the 0–127 table; the row gives 114.

Load this value in the converter

Common phrases people convert: load one of these into the decoder

Every example above reverses exactly — read the same codes back as characters.

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. the ASCII table this converter reads from 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.

Text to ASCII Code in Code

The same rule in one line. Both take code values and return the characters.

Python: bytes(int(g, 10) for g in s.split()).decode('utf-8')
JavaScript: new TextDecoder().decode(new Uint8Array(s.split(/\s+/).map(g => parseInt(g, 10))))

Common Mistakes

Frequently Asked Questions

What are the ASCII codes for A to Z and a to z?

A to Z are 65 to 90; a to z are 97 to 122. A is ASCII 65 = 0x41 = 0o101 = 0b01000001; a is 97 = 0x61 = 0o141 = 0b01100001. Uppercase and lowercase differ by 32, which is bit 5.

Is text to ASCII the same as ASCII art?

No. This page gives the code value for each character — A is 65. ASCII art draws pictures out of ASCII characters, which is a different thing entirely.

What happens to characters that are not in ASCII, like é?

The converter flags them rather than guessing. é is code point 233, past the end of the table. 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.

How do you convert text to ASCII in Python?

ord('A') gives 65 for one character; [ord(c) for c in s] gives the whole list. 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.

Every code here reverses: the same value converts straight back in the ASCII code to character direction.

The rest of the family sits on the whole binary and text converter set.