Text to ASCII

Turn text into ASCII codes and ASCII codes back into text.

0 chars
0 words
0 lines
0 chars
0 words
0 lines

Text to ASCII Converter – Characters to ASCII Codes and Back

This converter turns any text into its ASCII codes and decodes a list of ASCII codes back into readable text. Type a word and you immediately see one number per character – in decimal, hexadecimal, octal, or binary – ready to paste into code, a spreadsheet, or a homework answer. Everything runs locally in your browser.

What ASCII is

ASCII (American Standard Code for Information Interchange) is the 7-bit character set from 1963 that still sits underneath almost every text format today. It assigns the numbers 0–127 to English letters, digits, punctuation, and control characters. For example H is 72, i is 105, and ! is 33, so Hi! becomes 72 105 33 in decimal or 48 69 21 in hex. UTF-8 was designed so that these 128 characters keep exactly the same byte values, which is why ASCII codes are still useful for debugging modern files and protocols.

The printable ASCII range (32–126)

Codes 0–31 and 127 are invisible control characters. The 95 printable characters live between 32 and 126:

Range Characters Notes
32 space the only printable "blank"
33–47 ! " # $ % & ' ( ) * + , - . / punctuation and symbols
48–57 0–9 digit value = code − 48
58–64 : ; < = > ? @ symbols
65–90 A–Z uppercase letters
91–96 [ \ ] ^ _ and backtick brackets and symbols
97–122 a–z lowercase = uppercase + 32
123–126 {, vertical bar, }, ~ braces, pipe, and tilde

Options explained

  • Number base – decimal (72), hexadecimal (48), octal (110), or binary (01001000). The same setting is used when decoding.
  • Characters – ASCII only rejects anything above 127 so you notice non-ASCII input; UTF-8 bytes outputs the real byte sequence of every character; Unicode code points outputs one number per character, even for emoji.
  • Separator – space, comma, new line, or nothing between the codes.
  • Prefix – adds 0x, 0o, or 0b so the numbers can be pasted straight into source code.

When you need it

Programmers use ASCII codes to build byte arrays, compare characters in C or Python, check for hidden characters, and read protocol specifications. Students use them for computer-science exercises and simple ciphers. To inspect one character at a time with all bases side by side, open Char to ASCII; for pure 0s and 1s try Text to Binary.

Frequently Asked Questions

Standard ASCII only defines 128 characters (0–127), and accented letters, currency symbols, and emoji are not among them. Switch the Characters option to UTF-8 bytes to get the multi-byte UTF-8 sequence (é becomes 195 169), or to Unicode code points to get one number per character (é becomes 233, € becomes 8364).

A space is 32 (0x20). Digits 0–9 are 48–57, so subtracting 48 from a digit's code gives its value. Capital letters A–Z are 65–90 and lowercase a–z are 97–122 – exactly 32 apart, which is why flipping bit 5 toggles the case of an ASCII letter.

Yes. Choose ASCII to Text and set Number base to Hexadecimal, Octal, or Binary. Prefixed codes such as 0x48 or 0b01001000 are recognised automatically, and spaces, commas, semicolons, and brackets all work as separators.

Without a separator, decimal codes run together (7210110810811 could be read many ways), so only fixed-width bases can be split again reliably. Use hexadecimal (2 digits per byte) or binary (8 digits per byte) with no separator, or keep a space or comma between decimal codes.