Text to ASCII converter
Type any text and get its ASCII codes: Hello is 72 101 108 108 111. Switch Output to hex, binary or octal, and every space and punctuation mark gets its own code.
Show each character
Runs in your browser. Nothing you type is uploaded.
How to use the converter
- Type or paste text in the left box.
- Pick Decimal, Hex, Binary or Octal under Output. Decimal is what most people mean by ASCII codes.
- Choose a separator under the box: spaces, commas, new lines or none.
- Copy, download or share the codes. The ASCII to text tab above the tool turns codes back into words.
How to convert text to ASCII
ASCII numbers 128 characters from 0 to 127: the English letters in both cases, the digits, punctuation, the space and some invisible control codes. To convert text, replace each character with its number, in order, without skipping spaces.

Capital I is 73, the space is 32, l is 108, o is 111, v is 118, e is 101, y is 121 and u is 117. That gives 73 32 108 111 118 101 32 121 111 117 for the three words.
ASCII codes for every letter
| Letter | Capital | Small |
|---|---|---|
| A | 65 | 97 |
| B | 66 | 98 |
| C | 67 | 99 |
| D | 68 | 100 |
| E | 69 | 101 |
| F | 70 | 102 |
| G | 71 | 103 |
| H | 72 | 104 |
| I | 73 | 105 |
| J | 74 | 106 |
| K | 75 | 107 |
| L | 76 | 108 |
| M | 77 | 109 |
| N | 78 | 110 |
| O | 79 | 111 |
| P | 80 | 112 |
| Q | 81 | 113 |
| R | 82 | 114 |
| S | 83 | 115 |
| T | 84 | 116 |
| U | 85 | 117 |
| V | 86 | 118 |
| W | 87 | 119 |
| X | 88 | 120 |
| Y | 89 | 121 |
| Z | 90 | 122 |
Small letters are always 32 higher than their capital. Digits are just as regular: 0 is 48 and 9 is 57, so the code of a digit is the digit plus 48. The ASCII table has the punctuation and control codes too.
The same text in decimal, hex, binary and octal

ASCII codes are ordinary numbers, so they can be written in any base. Hex is popular in programming because each code is exactly two digits, and binary shows the actual bits stored in memory. For hex output with more style options, use text to hex; for binary, ASCII to binary.
Text to ASCII codes, not ASCII art
Some tools with a similar name draw big banner letters out of characters, which is called ASCII art. This converter does something different: it gives the code number of each character, the way a computer stores it.
Characters that are not ASCII
Accented letters, other alphabets and emoji are outside ASCII. With the default UTF-8 encoding, é comes out as two codes, 195 169, because UTF-8 stores it in two bytes. Choose ISO-8859-1 or Windows-1252 under Encoding to get the single code 233 instead. For a character such as € or an emoji, the Unicode converter shows its code point, U+20AC for the euro sign.
Text to ASCII in Python, JavaScript, Excel and C
- Python:
[ord(ch) for ch in "Hi"]returns[72, 105]. For UTF-8 bytes, uselist("héllo".encode()). - JavaScript:
[..."Hi"].map(ch => ch.charCodeAt(0))returns[72, 105]. For emoji, MDN's charCodeAt() page explains why you needcodePointAt()instead. - Excel and Google Sheets:
=CODE("A")returns 65. - C:
printf("%d", 'A');prints 65, because a char is stored as its code.
Frequently asked questions
What is the ASCII code for a space?
32, or 20 in hex. It counts as a character like any other.
What is the ASCII value of A and a?
Capital A is 65 and small a is 97.
What is "I love you" in ASCII?
73 32 108 111 118 101 32 121 111 117.
How do I find the ASCII value of one character?
Type it in the box above, or look it up in the ASCII table. In code, Python's ord() and JavaScript's charCodeAt() do the same thing.
Why does my text give more numbers than characters?
Some characters are not ASCII, and UTF-8 stores them in two to four bytes. The tool shows a note when that happens.
Is my text sent anywhere?
No. The codes are worked out in your browser.

