Text to ASCII Converter
See the number behind every character you type. A is 65, a is 97, a space is 32 and ! is 33. Letters beyond plain English get their Unicode code point, or you can show the UTF-8 bytes instead.
How to Convert Text to ASCII Codes
Quick answer: type or paste your text; each character appears as its decimal code below.
-
1
Type your text
Or paste it, or open a file.
-
2
Pick a separator
Space, comma, new line or none.
-
3
Choose code points or bytes
Only matters beyond plain English.
-
4
Copy or download
Use the codes anywhere.
What You Get
What Is ASCII?
ASCII is the original character code used by computers. It gives each of 128 characters a number from 0 to 127: the capital letters A to Z are 65 to 90, the small letters a to z are 97 to 122, the digits 0 to 9 are 48 to 57, a space is 32, and punctuation fills the gaps. Codes 0 to 31 are control characters such as tab (9) and new line (10). Today's Unicode standard keeps exactly the same numbers for these characters and adds many thousands more.
Accents, Symbols and Emoji
Characters such as é, €, ñ or 😀 are not part of the original 128 ASCII characters. With code points, the default, each one gets its Unicode number: é is 233, € is 8364 and 😀 is 128512. With UTF-8 bytes, you see how the character is stored in files, as two to four numbers each below 256, so é becomes 195 169. Plain English text gives the same result in both modes.
Why Look Up Character Codes?
Programmers check codes when comparing strings, sorting, writing parsers and debugging files with odd characters. Students learn how computers store text. Spreadsheet users find hidden characters that break formulas, such as a non-breaking space (160) instead of a normal space (32). Puzzle makers and teachers create number-to-letter codes. Keyboard users look up codes for typing special characters with Alt codes.
Example
"Hello!" becomes 72 101 108 108 111 33. Notice that the capital H is 72 while a small h would be 104: capital and small letters always differ by exactly 32. To turn codes back into letters, use ASCII to Text.
Step by Step
Type a word to see how it works, then paste your full text. Choose a space separator for reading, a comma for code and spreadsheets, a new line for one code per row, or none for a continuous string. Leave code points selected unless you need the stored bytes. Copy the codes or download them as a .txt file. Spaces and line breaks appear as 32 and 10, so you can spot them easily.
Good to Know
Tabs are 9, line feeds are 10 and carriage returns are 13; text from Windows often has 13 followed by 10 at the end of each line. Codes above 127 are not strictly ASCII but are shown so nothing is lost. For the same characters as ones and zeros or as two-digit hex bytes, see Text to Binary and Text to Hex.
More Examples
Some useful codes to remember: the digits 0 to 9 are 48 to 57, so the character "7" is 55, not 7. The full stop is 46, the comma 44, the hyphen 45, the at sign 64 and the underscore 95. Brackets are 40 and 41, square brackets 91 and 93, and curly brackets 123 and 125. Curly quotes from word processors are not ASCII: the left double quote is 8220 and the right one 8221, while the plain straight quote is 34. Seeing 8220 in a list of codes tells you the text came from a word processor rather than a plain text editor.
Private, Free and Instant
The converter is free and handles text up to 5 MB. There is no sign-up, no limit and nothing to install. The conversion runs inside your browser, so your text and data are never uploaded, logged or stored. The result updates as you type or paste, and you can open a text file from your device and download the result as a new .txt file. It works on Windows, Mac, Linux, Chromebooks, iPhone and Android, in any modern browser.
Text to ASCII Codes
Each character has an ASCII code: A is 65, a is 97, 0 is 48. Writing text as codes helps with programming exercises, puzzles and checking what a string really contains. Characters above 127 are not ASCII, so use Unicode for them. To decode, use ASCII to text.
Frequently Asked Questions
Questions about ASCII codes