Text to ASCII Converter
Turn text into character codes in decimal, hex, binary or octal, one code per character, updated as you type and worked out in this tab.
Input Text
ASCII Output
What Is a Text to ASCII Converter?
Every character you type (letters, digits, punctuation, spaces) has a number assigned to it in the ASCII standard (American Standard Code for Information Interchange). Originally published in 1963, ASCII maps 128 characters to the integers 0–127. A Text to ASCII converter takes each character in your input and outputs its corresponding numeric code, so you can see exactly what a machine "sees" when it reads your text. This is useful when debugging encoding issues, working with serial protocols, studying how compilers tokenize strings, or just satisfying your curiosity. You can view codes in decimal (the default), hexadecimal (base 16, common in programming), binary (base 2, what the hardware actually stores), or octal (base 8, still used in Unix file permissions). The ASCII table is one of the most referenced documents in computing, and this tool puts it to work interactively. For characters beyond the standard 0–127 range (accented letters, emoji, CJK), the tool outputs their Unicode code point values, which is a superset of ASCII for the first 128 entries.
How to Use
Type or paste your text
Type or paste on the left, or load a .txt file with Upload. Each character gets its own code, so Hi! reads 72 105 33 in the default decimal view; Hex, Binary and Octal sit above the output.
Choose format and separator
Select your output format (Decimal, Hex, Binary, or Octal) and how codes are separated (space, comma, or one per line). The output updates in real time as you type.
Copy or download the result
Hit "Copy" to grab the ASCII codes to your clipboard, or "Download" to save them as a .txt file.
Example
Here's a worked example. The word "Hello" converts to five decimal ASCII codes, one for each character.
"Hello" → Decimal ASCII codes
Hello→ Decimal ASCII
72 101 108 108 111FAQ
What is the ASCII code for a space?
A space character has the decimal ASCII code 32 (hex 20, binary 00100000). It's one of the most commonly checked codes. You can check this, and any other character, on the ASCII table.
What happens with characters above ASCII 127?
Standard ASCII only covers 0 to 127. For anything beyond that (accented letters, CJK, emoji) the tool shows the Unicode code point from JavaScript's codePointAt(), one number per character: "é" is 233 and 😀 is 128512 (0x1F600), not two surrogate halves. These are code points, not the UTF-8 bytes a file stores; for the bytes, use String to Hex.
What is the difference between decimal, hex, and binary output?
They're all the same number, just written in different bases. Decimal (base 10) is what humans use day-to-day. Hexadecimal (base 16) is compact and favored in programming: "A" is 0x41. Binary (base 2) shows the raw bit pattern, useful for low-level work. Octal (base 8) is less common today but still appears in Unix permissions and some older protocols.
Is my text sent to a server?
No. Each code comes from codePointAt(), called character by character by this page's script, and the text is never posted. Even the Download file is built in the browser from the output pane.
Can I convert ASCII codes back to text?
Not with this tool directly. This page only goes text → codes. For the reverse, look for an ASCII to text converter. Many online tools handle both directions, and in JavaScript you can use String.fromCharCode() to reconstruct the original string from decimal codes.
Why do uppercase and lowercase letters have different codes?
ASCII assigns separate code points to each case. "A" is 65, "a" is 97, a difference of exactly 32, which is the bit you flip to switch case. This design was intentional; it makes case conversion trivially fast in hardware, and it's why the original ASCII layout looks the way it does.