ASCII Text Converter
ASCII Character Codes: Letters as Numbers
ASCII character conversion connects the letters, punctuation, and symbols people type with the numeric values software can process. ASCII, short for American Standard Code for Information Interchange, was established for teletypes and early computers and assigns the original character set values from 0 through 127. UTF-8 preserves those same first 128 values, so ordinary ASCII text has the same numeric codes in both systems.
For example, the capital letter “A” has decimal code , hexadecimal code , and binary representation . Its binary place values confirm that . This ASCII converter shows decimal and hexadecimal values for each entered character, while its reverse field turns entered numeric codes back into characters.
ASCII Decimal, Hexadecimal, and Binary Representations
ASCII codes can be written in decimal, binary, or hexadecimal. Decimal uses base 10, binary uses base 2, and hexadecimal uses base 16, with one hex digit representing four binary bits. For the ASCII value 65, division by 16 gives . The quotient and remainder form hexadecimal “41.”
ASCII hexadecimal decoding uses positional weights. For a two-digit hexadecimal value , its decimal value is . Thus is , the code for capital “O.” More generally, a quotient and remainder satisfy , where the remainder becomes the final hexadecimal digit. The decoder accepts both decimal tokens and hexadecimal tokens beginning with 0x.
Common ASCII Character Code Table
This ASCII reference table lists decimal and hexadecimal values for several letters and digits that are useful when checking an encoded message.
| Character | Decimal | Hex |
|---|---|---|
| A | 65 | 0x41 |
| B | 66 | 0x42 |
| C | 67 | 0x43 |
| a | 97 | 0x61 |
| b | 98 | 0x62 |
| c | 99 | 0x63 |
| 0 | 48 | 0x30 |
| 1 | 49 | 0x31 |
| 2 | 50 | 0x32 |
These ASCII entries show useful ranges: uppercase letters are 65–90, lowercase letters are 97–122, and digits are 48–57. The uppercase range can be expressed as , while digits satisfy . In the English alphabet portion of ASCII, subtracting 32 changes a lowercase letter code to its uppercase equivalent: .
ASCII Control Characters and Invisible Codes
ASCII control characters occupy codes 0–31 rather than displaying as ordinary symbols. They were designed to control communications and formatting; familiar examples include carriage return and line feed . Their usual paired order in a carriage-return/line-feed sequence is . In raw data these may be represented as \r\n. When encoding text, this converter reports their numeric values just as it does printable characters; decoding one can create an invisible or formatting character in the output.
ASCII Compatibility with Unicode and UTF-8
ASCII conversion remains useful because ASCII is the shared beginning of UTF-8. Unicode provides many more characters than ASCII, while UTF-8 encodes values 0–127 with the corresponding single-byte ASCII values. For an ASCII value , the UTF-8 byte value is likewise . Consequently, ASCII text is valid UTF-8, but text containing characters outside that range is not ASCII.
This page’s browser code uses JavaScript character-code functions rather than enforcing an ASCII-only range. It can therefore display UTF-16 code-unit values for non-ASCII input and create characters from entered numeric values, but those results are not a UTF-8 byte decoder. In particular, non-BMP Unicode characters require more than one UTF-16 code unit, so use a dedicated Unicode or UTF-8 tool when byte-level Unicode conversion is required.
How the ASCII Character Conversion Works
The ASCII character mapping associates each member of the original ASCII set with an integer. If is that character set and is the set {0,…,127}, ASCII defines a bijection . Its inverse maps an ASCII number back to its character.
In this converter, charCodeAt() supplies the numeric code used for each entered character, corresponding to , and String.fromCharCode() creates output characters from parsed values, corresponding to . Those JavaScript functions work across the UTF-16 code-unit range, which is why the interface can produce values beyond ASCII even though the ASCII explanations and reference table focus on 0–127.
ASCII Code History and Lasting Relevance
ASCII grew out of telegraph and teletype conventions and originally used seven bits, leaving room in an eight-bit transmission unit for parity checking. The seven-bit range contains possible values. Later systems used many incompatible eight-bit extensions, while Unicode became the broader standard for international text.
ASCII character codes still appear in programming, protocol headers, serial devices, logs, configuration formats, and debugging output. Recognizing the difference between a character such as “1” and its code 49 can prevent errors when a system expects bytes or numeric commands.
Practical ASCII Encoding and Decoding Uses
ASCII conversion is especially helpful when examining serial data. A device receiving the characters “1 0 0” receives the codes , including the spaces; that differs from receiving one numeric byte with value 100. Paste a space-separated sequence into the decoder to inspect the characters it represents.
ASCII hexadecimal values also clarify familiar web notation. The less-than sign “<” is decimal and hexadecimal , while a space is decimal 32 and is commonly percent-encoded as %20. URL percent-encoding is not identical to this converter’s output format, but the hexadecimal character value is the connection between them.
ASCII Converter Limitations and Extensions
This ASCII text converter accepts plain text for code display and accepts whitespace-separated decimal or 0x-prefixed hexadecimal values for decoding. It does not parse escape notation such as \x41, interpret UTF-8 byte sequences, or show binary output. Its use of JavaScript character-code functions also means it is best viewed as a character-code utility rather than a strict validator of the 7-bit ASCII standard.
ASCII Converter Accessibility and Interface Choices
The ASCII converter keeps encoding and decoding in separate labeled text areas so the direction of conversion is clear. Its results use a monospaced output area, making a sequence of decimal and hexadecimal codes easier to scan. The calculator itself runs in the browser and does not submit the entered text through a form action.
Using This ASCII Text Converter
To encode text as character codes, type or paste it into the first text area and select Convert to ASCII. Each character is shown as a decimal value followed by hexadecimal notation in parentheses, such as “72(0x48) 101(0x65).” To decode, enter space-separated decimal codes or 0x-prefixed hexadecimal codes in the second text area and select Convert to Text.
Try a short word, compare uppercase and lowercase values, or inspect a sequence captured from a device. Checking each code against the character you expect is the most reliable way to distinguish text data from numeric byte values.
ASCII Signal Cipher Sprint
Steady the signal cursor on the right ASCII code before the next transmission window closes. Each hit locks a character into memory and turns decimal into instinct.
Tap or drag to move the signal. Keyboard: ← → to nudge, space to stabilize drift, Esc to pause. Glitch windows boost points.
Play for 80 seconds by keeping the signal aligned with the target ASCII code band. Use touch or mouse drag to move, arrow keys to nudge, space to stabilize, and Escape to pause or resume.
