Free Online Text to ASCII Converter
Convert text to ASCII codes and back.
Each character is encoded as its Unicode code point. Standard ASCII characters produce values from 0 to 127.
0 characters
Codes are separated by spaces by default, which makes the output easy to read. When decoding, spaces, commas, semicolons, and new lines are all accepted as separators.
About the Text to ASCII Converter
Every character stored by a computer has a numeric code. This converter turns text into those numbers and turns numbers back into text. You can work in decimal, hexadecimal, or binary, choose a separator, and pad short values with leading zeros. The conversion happens instantly as you type, so it doubles as a learning aid for character encoding and a practical tool for inspecting data.
ASCII and Unicode code points
ASCII defines 128 codes, from 0 to 127. They include control characters such as line feed and tab, punctuation, digits, uppercase and lowercase Latin letters. Modern text almost always uses Unicode, which is a much larger character set that includes ASCII as its first block. This tool encodes each Unicode code point, so a letter such as A becomes 65 and an emoji becomes a value above 127. When a character falls outside ASCII, the tool tells you so, because the result is then a Unicode code point rather than a strict ASCII value.
Decimal, hexadecimal, and binary output
- Decimal: the familiar base-10 value, such as 72 for an uppercase H.
- Hexadecimal: base 16, using digits 0–9 and letters A–F, such as 48 for H.
- Binary: base 2, using only zeros and ones, such as 01001000 for H.
Padding makes fixed-width output easier to compare. Decimal values are not padded by default, hexadecimal values are padded to two digits for ASCII and more for larger code points, and binary values are padded to eight bits for ASCII and sixteen or more for larger values. Turning padding off produces the shortest representation.
Decoding safely
When decoding, each token is parsed in the selected base. The converter accepts an optional 0x
prefix for hexadecimal input and ignores extra whitespace. Values must be valid Unicode code points between 0 and
1,114,111. Surrogate code points from 0xD800 to 0xDFFF are rejected because they cannot stand alone in a valid
string. If some tokens are invalid, the tool reports them and still decodes the valid ones, so a single typo does
not discard the whole result.
Why emoji need more than one unit
JavaScript strings are built from UTF-16 code units. Characters outside the Basic Multilingual Plane, including most emoji, require a surrogate pair, which is two code units for one character. The encoder uses full Unicode code points so the number you see describes one character, not two halves. Keep that distinction in mind when comparing this output with tools that report UTF-16 units instead.
Frequently asked questions
Why does my accented letter produce a number above 127?
Accented letters are not part of the original ASCII range. They are Unicode characters, so their code points are larger than 127. The tool still encodes them correctly, but the result is technically a Unicode code point.
Can I decode codes that use a different separator?
Yes. Decoding accepts spaces, commas, semicolons, pipes, and line breaks automatically. You do not need to match the separator used during encoding.
What happens if I enter a decimal code with a decimal point?
It is treated as invalid because code points are integers. Remove the fraction or use the correct whole-number value.