ASCII to Text Converter
Convert ASCII codes to text, or text to ASCII decimal and octal codes — right in your browser.
Free online ASCII to text converter — paste space-separated ASCII codes to instantly decode ASCII to text, or type text to encode it to ASCII decimal or octal codes. Handles commas and newlines as separators, and flags invalid or out-of-range codes without breaking the rest of the conversion. No data is sent to a server.
Mode
Format
Separator
Quick reference
- 'A'
- → decimal 65 · octal 101
- 'a'
- → decimal 97 · octal 141
- '0'
- → decimal 48 · octal 060
- Space
- → decimal 32 · octal 040
Some codes were skipped:
What is ASCII?
ASCII (American Standard Code for Information Interchange) is a character-encoding standard that assigns a numeric code to each letter, digit, punctuation mark, and control character. Standard ASCII covers 128 code points (0–127): codes 0–31 are non-printing control characters (like tab and newline), 32–126 are printable characters (letters, digits, punctuation, space), and 127 is the delete character. This tool also supports extended ASCII (0–255), which adds accented Latin characters like 'é' and 'ñ' in the upper half of the range.
Each ASCII code point can be written in different number bases. This tool converts between text and two of the most common: decimal (base 10, the everyday number system) and octal (base 8, using only digits 0–7).
ASCII decimal vs octal representation
The underlying code point is identical — only the base used to write the number changes:
Character: H e l l o
Decimal: 72 101 108 108 111
Octal: 110 145 154 154 157
Binary: 01001000 01100101 01101100 01101100 01101111
Decimal is the most widely used format today — it's what you'll see in most programming references, HTML character entities (H), and general documentation. Octal was more common in early computing on systems built around 3-bit or 9-bit word boundaries (each octal digit maps cleanly onto 3 bits), and still appears in Unix file permissions (chmod 755) and some legacy protocols.
How to convert text to ASCII codes in JavaScript, Python, and PHP
JavaScript
// Text → ASCII decimal codes
function textToDecimal(text) {
return Array.from(text)
.map(ch => ch.codePointAt(0))
.join(' ');
}
// Text → ASCII octal codes
function textToOctal(text) {
return Array.from(text)
.map(ch => ch.codePointAt(0).toString(8))
.join(' ');
}
// ASCII decimal codes → text
function decimalToText(codes) {
return codes.trim().split(/[\s,;]+/)
.map(n => String.fromCodePoint(parseInt(n, 10)))
.join('');
}
// ASCII octal codes → text
function octalToText(codes) {
return codes.trim().split(/[\s,;]+/)
.map(n => String.fromCodePoint(parseInt(n, 8)))
.join('');
}
textToDecimal('Hello'); // "72 101 108 108 111"
decimalToText('72 101 108 108 111'); // "Hello"
Python
# Text -> ASCII decimal codes
decimal_codes = ' '.join(str(ord(c)) for c in 'Hello') # '72 101 108 108 111'
# Text -> ASCII octal codes
octal_codes = ' '.join(oct(ord(c))[2:] for c in 'Hello') # '110 145 154 154 157'
# ASCII decimal codes -> text
text = ''.join(chr(int(n)) for n in '72 101 108 108 111'.split()) # 'Hello'
# ASCII octal codes -> text
text2 = ''.join(chr(int(n, 8)) for n in '110 145 154 154 157'.split()) # 'Hello'
PHP
// Text -> ASCII decimal codes
$codes = implode(' ', array_map('ord', str_split('Hello'))); // "72 101 108 108 111"
// ASCII decimal codes -> text
$text = implode('', array_map('chr', explode(' ', '72 101 108 108 111'))); // "Hello"
// ASCII octal codes -> text
$text2 = implode('', array_map(fn($n) => chr(octdec($n)), explode(' ', '110 145 154 154 157'))); // "Hello"
Need binary instead? Our binary decoder converts binary strings to text. Working with hex bytes? See the hex decoder or hex to decimal converter. For non-ASCII multi-byte text, try the UTF-8 decoder.
Common uses of ASCII code conversion
- Learning binary/decimal/octal/hex number systems — ASCII tables are a common teaching tool for how the same value looks in different bases.
- Debugging serial/network protocols — many legacy protocols and embedded systems log raw byte values as decimal or octal codes rather than characters.
- Puzzle and CTF challenges — ASCII-code ciphers are a classic beginner-level encoding puzzle.
- Unix file permissions — while not text encoding, octal notation (e.g.
chmod 644) is one of the more common places octal numbers still appear day to day. - Data recovery from raw dumps — memory or file dumps sometimes render bytes as decimal or octal codes that need converting back to readable text.
Frequently asked questions
72 101 108 108 111), and select whether the codes are decimal or octal. The tool converts each code to its corresponding character instantly. Commas and newlines are also accepted as separators, so codes copied from spreadsheets or other tools still work.
189 is not valid octal because octal digits only go 0–7), or it's a valid number but falls outside the 0–255 ASCII/extended-ASCII range. The rest of the valid codes still decode normally, so one bad token doesn't block the whole conversion.