ASCII to Decimal Converter
Convert ASCII characters to decimal values and decimal numbers back to ASCII text. Supports extended ASCII (0-255) with multiple output formats.
About
Every character transmitted across a network or stored on disk resolves to a numeric code point. The American Standard Code for Information Interchange (ASCII) maps 128 characters (indices 0 - 127) to decimal integers. Extended ASCII expands this to 256 values (0 - 255). Misinterpreting these mappings corrupts protocol headers, breaks serial communication, and produces garbled file output. This tool performs bidirectional conversion between ASCII text and its decimal representation, handling control characters (codes 0 - 31), printable characters (32 - 126), and extended range (128 - 255). Results approximate standard ASCII/ISO-8859-1 encoding. Characters outside the 0 - 255 range (Unicode) will produce code points beyond the ASCII table.
Formulas
The conversion from a character to its decimal code point uses the mapping function defined by the ASCII standard.
Where c is the input character and d is its decimal code point. The reverse mapping reconstructs the character from a decimal value.
For a string of n characters, the full conversion produces a sequence of n decimal values.
Where di = charCode(ci) for each index i from 1 to n. Standard ASCII covers codes 0 - 127. Extended ASCII (ISO-8859-1) covers 128 - 255. JavaScript's charCodeAt returns the UTF-16 code unit, which aligns with ASCII for values within the 0 - 127 range.
Reference Data
| Dec | Char | Description | Dec | Char | Description |
|---|---|---|---|---|---|
| 0 | NUL | Null | 64 | @ | At sign |
| 7 | BEL | Bell / Alert | 65 | A | Uppercase A |
| 8 | BS | Backspace | 66 | B | Uppercase B |
| 9 | HT | Horizontal Tab | 90 | Z | Uppercase Z |
| 10 | LF | Line Feed (\n) | 97 | a | Lowercase a |
| 13 | CR | Carriage Return (\r) | 98 | b | Lowercase b |
| 27 | ESC | Escape | 122 | z | Lowercase z |
| 32 | SP | Space | 48 | 0 | Digit zero |
| 33 | ! | Exclamation mark | 49 | 1 | Digit one |
| 34 | " | Double quote | 57 | 9 | Digit nine |
| 35 | # | Hash / Number sign | 127 | DEL | Delete |
| 36 | $ | Dollar sign | 128 | Ç | Extended: C cedilla |
| 37 | % | Percent sign | 169 | © | Extended: Copyright |
| 40 | ( | Left parenthesis | 174 | ® | Extended: Registered |
| 41 | ) | Right parenthesis | 176 | ° | Extended: Degree |
| 42 | * | Asterisk | 177 | ± | Extended: Plus-minus |
| 43 | + | Plus sign | 181 | µ | Extended: Micro |
| 44 | , | Comma | 188 | ¼ | Extended: One quarter |
| 45 | - | Hyphen / Minus | 189 | ½ | Extended: One half |
| 46 | . | Period / Full stop | 190 | ¾ | Extended: Three quarters |
| 47 | / | Forward slash | 215 | × | Extended: Multiplication |
| 58 | : | Colon | 247 | ÷ | Extended: Division |
| 59 | ; | Semicolon | 255 | ÿ | Extended: y diaeresis |
| 61 | = | Equals sign | 91 | [ | Left square bracket |
| 62 | > | Greater-than sign | 92 | \ | Backslash |
| 63 | ? | Question mark | 93 | ] | Right square bracket |