Char to ASCII Converter
Type or paste any text and instantly see the ASCII code for each character in decimal, hex, or octal format.
Last updated: May 29, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is Char to ASCII Converter?
Every character on your keyboard has a corresponding ASCII (American Standard Code for Information Interchange) code — a numeric value that computers use to represent that character. For example, the letter "A" has the ASCII code 65 in decimal, 0x41 in hexadecimal, and 101 in octal.
This tool converts every character in your input string to its ASCII code. It is useful for developers who need to know the exact numeric value of a character, for encoding or protocol work, for debugging text processing code, or for learning how characters are represented at the byte level.
Unlike the Byte-to-ASCII and Decimal-to-ASCII converters which work in the reverse direction, this tool goes from character to code.
How to Use Char to ASCII Converter
Type or paste text into the input field
Choose the output format: Decimal, Hex, or Octal
Choose the separator: Space, Comma, or Newline
The ASCII codes for every character appear instantly in the output panel
Click "Copy" to copy or "Download" to save the result
Common Use Cases
- Finding the ASCII code for a specific character when writing C, Python, or assembly code.
- Converting text to its hex byte representation for protocol headers or binary file work.
- Encoding a string as octal escape sequences for C string literals.
- Verifying that a character is printable ASCII (code 32–126) or a control character (0–31, 127).
- Generating ASCII art or text-based protocols where characters must be referenced by code.
- Debugging encoding issues by comparing the exact byte values of characters from different sources.
Example Input and Output
The word "Hi!" is converted to its decimal ASCII codes, showing the code for each character.
Hi!72 105 33Privacy
All character-to-ASCII conversion runs in your browser. No data is sent to any server.
Unicode vs ASCII
ASCII covers codes 0–127 only. Unicode extends this to hundreds of thousands of code points. JavaScript's String.charCodeAt() returns the UTF-16 code unit, which matches ASCII for characters in the 0–127 range. For characters above 127, the value returned is the Unicode code point, not necessarily the same as the ISO-8859-1 byte value.

