Text to ASCII Converter

Paste any text and see the numeric code of every character, shown as decimal, hexadecimal, octal or binary. Choose a delimiter, a 0x prefix, uppercase hex and zero-padding, then copy the result or switch to a table that lists each character on its own row. Codes can be converted back to text too, and it all runs in your browser.

Format

Delimiter

Why This Tool Matters

Character codes turn up whenever text meets something stricter than a text box. A student on a C programming course has to print the numeric value of each letter in a name. Someone reading a packet capture or a firmware log sees 48 65 6c 6c 6f and wants to know what it says. A puzzle-setter hides a message in decimal codes for a treasure hunt, and a developer chasing a string comparison that fails for no visible reason finds that one space is code 160, a non-breaking space, rather than 32. Seeing the numbers side by side settles it.

Because this tool works on text, it follows a clear rule for anything beyond ASCII: a character outside 0–127, like é or an emoji, is shown as its Unicode code point, and the note under the output says how many there were. Nothing is dropped or turned into a question mark. Those code points are not UTF-8 bytes, which is what a file or network connection would carry, so treat the output as character numbers, not a byte dump.

How to Use

  1. 01

    Enter your text

    Type or paste in the first box. Pick Decimal, Hex, Octal or Binary and the codes appear as you type.

  2. 02

    Tune the output

    Set the delimiter, add a 0x-style prefix, switch hex to uppercase, or zero-pad each value. Use Table for one row per character.

  3. 03

    Copy or reverse it

    Copy the codes, or choose Codes → Text to turn a list of codes back into text.

More Text Tools

Frequently Asked Questions

Is this ASCII art?

No. This tool converts text to character codes, the number that stands for each letter, digit or symbol, such as 72 for H. ASCII art, the pictures made of keyboard characters, is a different thing and this page does not make it.

What is the ASCII range, and how is it different from Unicode?

ASCII defines 128 characters, numbered 0 to 127: the letters A–Z and a–z, the digits, punctuation, a space, and 33 control codes such as tab (9) and line feed (10). Unicode extends the same numbering to more than a million possible code points and keeps the first 128 identical to ASCII, so A is 65 in both. Codes between 128 and 255 are not ASCII at all; they belong to various legacy 'extended ASCII' sets that disagree with each other.

What happens to characters outside ASCII, like é or emoji?

They are not dropped. Each one is converted to its Unicode code point in the format you chose, so é is 233 (E9 in hex) and 😀 is 128512. The note under the output counts them. Be aware that a code point is not the same as the UTF-8 bytes used when text is saved or sent: é takes two bytes in UTF-8, but it is a single code point here.

When should I use hex, octal or binary instead of decimal?

Whichever the thing you are working with uses. Hexadecimal is the usual choice when reading memory dumps, network traffic and color codes, because two digits cover one byte. Octal shows up in Unix file permissions and C escape sequences such as \101. Binary is for seeing the individual bits, and decimal is the plain number you would use in most programming exercises.

How does Codes → Text read my input, and what counts as an error?

It splits your codes on spaces, commas, semicolons or line breaks, strips an optional 0x, 0o or 0b prefix for the chosen format, and converts each value. If there are no separators it splits the string into fixed-width values, such as two digits per byte for hex. A value that is not valid in the chosen format, is larger than the last Unicode code point (10FFFF in hex), or falls in the surrogate range reserved for UTF-16 gets a message naming which value is wrong, and the output is cleared.

Is my text sent to a server?

No. The conversion is plain JavaScript running in your browser, so nothing you type or paste is uploaded or stored.