Text to ASCII Code Converter
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.
- Read the first value. This example uses A.
- Convert it to a decimal code if it is not one already: 65.
- Look that code up in the table. 65 is 65.
- 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.
| Dec | Char | Hex | Oct | Bin |
|---|---|---|---|---|
| 32 | (space) | 20 | 040 | 00100000 |
| 65 | A | 41 | 101 | 01000001 |
| 73 | I | 49 | 111 | 01001001 |
| 97 | a | 61 | 141 | 01100001 |
| 98 | b | 62 | 142 | 01100010 |
| 100 | d | 64 | 144 | 01100100 |
| 101 | e | 65 | 145 | 01100101 |
| 102 | f | 66 | 146 | 01100110 |
| 103 | g | 67 | 147 | 01100111 |
| 106 | j | 6A | 152 | 01101010 |
| 108 | l | 6C | 154 | 01101100 |
| 110 | n | 6E | 156 | 01101110 |
| 111 | o | 6F | 157 | 01101111 |
| 114 | r | 72 | 162 | 01110010 |
| 116 | t | 74 | 164 | 01110100 |
| 117 | u | 75 | 165 | 01110101 |
| 118 | v | 76 | 166 | 01110110 |
| 121 | y | 79 | 171 | 01111001 |
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".
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
- Typing text where a code value belongs. The converter reads 72 as one code, not as the characters 7 and 2 — for whole text use convert text to binary.
- Reading a code in the wrong base. 41 is A in hex and ) in decimal.
- Expecting a character above 127. That value is outside ASCII and the answer depends on which extended set is meant.
- Dropping the padding on a fixed-width code, so a list of codes can no longer be split apart.
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.
Related Conversions
The rest of the family sits on the whole binary and text converter set.