Standard 7-bit ASCII assigns a decimal code from 0 to 127 to every letter, digit, punctuation mark, and control character in the original American Standard Code for Information Interchange, and an ASCII code converter turns text into that sequence of decimal numbers or decodes a sequence of decimal numbers back into the exact original text. Every printable ASCII character maps to a single decimal integer in that exact range, and the mapping is fixed by IETF RFC 20 and cross-checked against Unicode's C0 Controls and Basic Latin chart, which means the same input always produces the same output on every compliant tool. Because the range is small and the assignments are stable, an ASCII converter is the simplest character-encoding tool to demonstrate with a worked example: pick a short string, look up each character's decimal value, write down the sequence of numbers, then feed those same numbers back into the converter and confirm the rebuilt text matches the original byte for byte. This round-trip property is what makes a converter example reproducible, and it is also why the tool can be strict about validation, since there is no ambiguity to hide behind. Higher values, multi-byte sequences, and locale-specific code pages are all outside the 7-bit ASCII range, so a tool that respects the standard rejects them rather than silently substituting a different character.

ascii code converter example
ASCII Code Converter Example: Text to Decimal and Back

What an ASCII Code Converter Produces

An ASCII converter accepts two kinds of input and produces one matching kind of output. Choose text-to-codes and the converter walks through your input character by character, looks up each character's decimal value in the 7-bit ASCII table, and returns a list of decimal integers separated by spaces. Choose codes-to-text and the converter parses a list of decimal integers separated by spaces, commas, or line breaks, then rebuilds the original characters in order. The tool stays in the current browser tab, so the input never leaves your machine, and the accepted range is exactly 0 through 127, not 0 through 255, not extended ASCII, and not a locale-specific code page.

That strict 0–127 boundary matters. Values from 128 to 255 can mean different things in Windows-1252, ISO-8859-1, and other legacy code pages, so a converter that silently reinterprets them can give you the wrong character without warning. The ASCII Converter rejects the first character outside 7-bit ASCII and reports its position, and on the decode side it rejects signs, fractions, hexadecimal prefixes, empty tokens, and any value above 127. Failing closed like this is what makes a converter example reproducible, because the same input always gives the same output.

How to Run a Text-to-Codes Conversion

  1. Open the ASCII Converter and choose the text-to-codes direction.
  2. Paste or type the string you want to encode. Anything you can type on a US keyboard fits, and so do control characters such as TAB and line feed.
  3. Select Convert ASCII. The result appears in the output area as a single line of space-separated decimal integers, one per input character.
  4. Read the decimal codes. Each integer is between 0 and 127 and follows the assignment fixed by RFC 20.
  5. Copy the result with the copy button if you need to paste the decimal sequence into a notebook, a program, or a message.

If you already have the decimal codes and want to test the reverse path, switch to codes-to-text, paste the decimal list with any mix of spaces, commas, or line breaks between the numbers, and select Convert ASCII again. The converter tokenizes the input, checks every token against the 0–127 rule, and rebuilds the exact characters in their original order.

Example: Encoding the Word "Hi" to Decimal

A concrete ASCII code converter example starts with a two-letter word. Take "Hi" with capital H followed by lowercase i. Using the fixed ASCII assignments, capital H is decimal 72, and lowercase i is decimal 105. The text-to-codes direction therefore produces:

72 105

That is the complete output for the input "Hi": one decimal integer per character, separated by a single space. If you add an exclamation mark at the end, "Hi!" becomes 72 105 33 because decimal 33 is the exclamation point. If you add a space, "Hi you" becomes 72 105 32 121 111 117, since decimal 32 is the space character itself. Each code is independently meaningful, and you can confirm every one of them against the standard 7-bit ASCII table.

Reading the Output

Space-separated decimal is the simplest format to copy into other tools and to talk about in writing. A few codes are worth recognizing by sight because they appear often: decimal 9 is TAB, decimal 10 is line feed, decimal 13 is carriage return, decimal 32 is the space, decimal 48 is the digit zero, decimal 57 is the digit nine, decimal 65 is uppercase A, decimal 90 is uppercase Z, decimal 97 is lowercase a, decimal 122 is lowercase z, and decimal 127 is DEL.

DecimalCharacterCategory
0NULControl
9TABControl (whitespace)
10LFControl (line break)
13CRControl (carriage return)
32SpacePrintable whitespace
480Digit
65AUppercase letter
97aLowercase letter
127DELControl

The values above are taken from the official RFC 20 and the Unicode C0 Controls and Basic Latin chart, not computed. The full table runs 0 to 127 and includes every punctuation mark, both letter cases, and every digit; the rows above are the ones most often reached for in everyday conversions.

Example: Decoding Numbers Back to Characters

The reverse direction takes a sequence of decimal integers and returns the corresponding characters. Take the codes 72 105 from the previous section and feed them into the codes-to-text input. The converter tokenizes 72 and 105, checks each token is an unsigned integer in the range 0–127, and writes out the matching characters in order, giving you back "Hi" exactly.

You can mix separators freely. The input "72, 105" and the input "72\n105" both decode to the same two-character string, because the converter splits on commas, spaces, and line breaks. You can also include leading zeros if you find them easier to read: "072 105" still decodes to "Hi". Tokens with a leading sign, a decimal point, or a hexadecimal prefix such as 0x48 are rejected, because they are not plain unsigned integers in the 0–127 range.

For a longer worked example, the string "ABC" encodes to 65 66 67. Decoding 65 66 67 returns "ABC". Adding one space between every pair of characters with commas gives "65, 66, 67", which still decodes to "ABC". This round-trip property is what makes the tool useful for hand-checking: encode a string you know, decode the numbers, and confirm the result matches the original.

When Decoded Output Appears Empty

A common surprise when looking at decoded output is that some characters do not show a visible glyph. Codes 0 through 31 and code 127 are control characters, so they act visually rather than as a printable shape: TAB advances to the next tab stop, line feed starts a new line, carriage return returns the cursor, and the rest show nothing at all. If your input contains 65 9 66 67, the output reads "A" then a tab then "BC", which most browsers render with extra space between the A and the BC. If your input contains 65 0 66, the output reads "A" then nothing visible then "B", because NUL has no glyph.

When visibility matters, look at the decimal output instead of the decoded output. Copying the decimal sequence into a byte-aware editor or a hex viewer is the safest way to inspect control characters without losing them. The converter does not strip control codes, since they are part of the 7-bit ASCII range, but the rendered text on screen may hide them.

What the Converter Rejects

Every input that does not fit the 7-bit ASCII rule fails with a visible error rather than a silent rewrite. On the encode side, the first character whose value exceeds 127 stops the conversion and the converter reports its position. So an input of "ABCé" produces "65 66 67" and an error flag on the lowercase é, because the e-acute character has a Unicode code point outside the 7-bit ASCII range. On the decode side, tokens that are not plain unsigned integers, or that fall outside 0 through 127, are rejected, with a message pointing at the offending token.

There is also an upper bound on input size. The ASCII Converter accepts up to 100,000 UTF-16 code units on the encode side and up to 50,000 codes on the decode side. For anything larger, for UTF-8 byte conversions, for code pages such as Windows-1252 or ISO-8859-1, or for Unicode code points and emoji, you need a converter that explicitly names the encoding it expects. Treating Unicode as ASCII is one of the classic sources of mojibake, and the strict rejection rules in the ASCII Converter are designed to prevent that mistake from happening quietly.

Several encoding tools on this site look similar at first glance. The ASCII Converter is the one that handles a complete text sequence as decimal 7-bit values and fails closed when the input is not ASCII. The table below summarizes where each tool draws its boundary.

ToolInput formatOutput formatAccepted range
ASCII ConverterASCII text or decimal 0–127Decimal 0–127 or ASCII text0 to 127
Binary To TextBinary stringsUnicode textUTF-8 byte values
Text To HEXUnicode textHexadecimal bytesUTF-8 byte values
Hex to Text ConverterHexadecimal bytesUnicode textUTF-8 byte values

The other tools are 8-bit aware by design: they work on UTF-8 bytes, so they can represent any Unicode character including accented letters and emoji. The ASCII Converter is 7-bit by design, which is exactly what you need when the assignment you care about is the one fixed by RFC 20. If you want the hex form of a decimal value such as 72, the ASCII Converter will not do it directly; you would round-trip the value through the Text To HEX tool after first decoding it back to a character, or use a reference table. The cheat sheet ASCII Code Converter Cheat Sheet: Quick Decimal Reference is the quickest lookup for individual characters and their decimal values when you only need a handful of codes.