ASCII Code to Text Converter
Convert ASCII decimal codes to readable text and text to ASCII codes. Supports standard (0-127) and extended (0-255) ASCII with multiple delimiters.
About
ASCII (American Standard Code for Information Interchange) maps each character to a unique integer in the range 0 - 127. Extended ASCII expands this to 255, covering additional Latin, box-drawing, and accented characters. Misinterpreting a single code - substituting 32 (space) for 23 (End of Transmission Block) - can corrupt serial protocols, break file headers, or produce garbled output in embedded systems. This tool parses a sequence of decimal ASCII values separated by a chosen delimiter, validates each against the range 0 - 255, and maps them via String.fromCharCode(n) to produce the corresponding text. The reverse mode encodes each character of an input string back to its decimal code using charCodeAt(i).
Control characters (codes 0 - 31 and 127) are non-printable. This tool renders them as labeled placeholders so you can identify NULL (0), TAB (9), LF (10), CR (13), and ESC (27) without ambiguity. Note: this converter handles single-byte encodings only. Multi-byte encodings like UTF-8 require separate tooling for codepoints above 255.
Formulas
The conversion from an ASCII decimal code to a character uses a direct mapping function defined by the ASCII standard (ANSI X3.4-1986).
The reverse operation extracts the decimal code from a character at position i in a string:
Where n is a decimal integer representing the ASCII code, char is the resulting single character, i is the zero-based index within the input string, and len is the total string length. Control characters (n < 32 or n = 127) are non-printable and are rendered with their standard abbreviations (NUL, SOH, STX, etc.).
Delimiter auto-detection scans the input and counts occurrences of common separators: comma (44), space (32), semicolon (59), tab (9), and newline (10). The separator with the highest frequency is selected as the active delimiter.
Reference Data
| Dec | Hex | Char | Description |
|---|---|---|---|
| 0 | 00 | NUL | Null character |
| 7 | 07 | BEL | Bell / Alert |
| 8 | 08 | BS | Backspace |
| 9 | 09 | TAB | Horizontal Tab |
| 10 | 0A | LF | Line Feed (newline) |
| 13 | 0D | CR | Carriage Return |
| 27 | 1B | ESC | Escape |
| 32 | 20 | SP | Space |
| 48 - 57 | 30-39 | 0-9 | Digits |
| 65 - 90 | 41-5A | A - Z | Uppercase Latin letters |
| 97 - 122 | 61-7A | a - z | Lowercase Latin letters |
| 33 | 21 | ! | Exclamation mark |
| 34 | 22 | " | Double quotation mark |
| 35 | 23 | # | Number sign / Hash |
| 36 | 24 | $ | Dollar sign |
| 37 | 25 | % | Percent sign |
| 38 | 26 | & | Ampersand |
| 40 | 28 | ( | Left parenthesis |
| 41 | 29 | ) | Right parenthesis |
| 42 | 2A | * | Asterisk |
| 43 | 2B | + | Plus sign |
| 44 | 2C | , | Comma |
| 45 | 2D | - | Hyphen-minus |
| 46 | 2E | . | Full stop / Period |
| 47 | 2F | / | Solidus / Slash |
| 64 | 40 | @ | Commercial at |
| 91 | 5B | [ | Left square bracket |
| 92 | 5C | \ | Reverse solidus / Backslash |
| 93 | 5D | ] | Right square bracket |
| 123 | 7B | { | Left curly bracket |
| 125 | 7D | } | Right curly bracket |
| 126 | 7E | ~ | Tilde |
| 127 | 7F | DEL | Delete |
| 128 | 80 | ร | Latin capital C with cedilla (Extended) |
| 176 | B0 | ยฐ | Degree sign (Extended) |
| 181 | B5 | ยต | Micro sign (Extended) |
| 224 | E0 | ฮฑ | Greek lowercase alpha (Extended) |
| 227 | E3 | ฯ | Greek lowercase pi (Extended) |
| 241 | F1 | ยฑ | Plus-minus sign (Extended) |
| 246 | F6 | รท | Division sign (Extended) |
| 248 | F8 | ยฐ | Degree sign alt (Extended) |
| 255 | FF | NBSP | Non-breaking space (Extended) |