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.
Frequently Asked Questions
What is the ASCII code for common characters?
Space = 32, ! = 33, 0 = 48, A = 65, a = 97, z = 122. The full printable range is 32–126. Codes 0–31 and 127 are non-printable control characters.
How do I get the hex ASCII code for a character?
Select "Hex" from the output format options. For example, "A" = 41 in hex, "a" = 61, space = 20. Hex values are shown in uppercase with a minimum of two digits.
What happens if I enter a character above ASCII 127?
Characters above code 127 (like accented letters é, ü or emoji 😀) have code points beyond the standard ASCII range. This tool uses JavaScript's charCodeAt() which returns the Unicode code point for the first surrogate half. Standard ASCII only covers 0–127.
Can I convert a multi-character string?
Yes. Every character in the input string is converted and the codes are output in order, separated by your chosen separator (space, comma, or newline).
Is this tool the reverse of ASCII to Text?
Yes. This tool converts text → ASCII codes, while ASCII to Text converts ASCII codes → text. They are inverse operations.
Related Tools
ASCII to Text Converter
Convert ASCII codes (decimal, hex, or octal) to readable text. Paste your ASCII code list and get the text string output instantly.
Text to ASCII Converter
Convert any text string to its ASCII codes in decimal, hexadecimal, octal, or binary. See the numeric value for every character in your text.
Byte to ASCII Converter
Convert decimal byte values (0–255) to their ASCII characters. Paste space or comma-separated byte values and get the ASCII text output instantly.
Decimal to ASCII Converter
Convert decimal ASCII codes to their corresponding characters. Enter space or comma-separated decimal values and get the ASCII text instantly.
Number Base Converter
Convert numbers between binary, decimal, hexadecimal, octal, and any custom base — with bit grouping, signed integers, and step-by-step explanation.
Base64 Encoder/Decoder
Encode text to Base64 or decode Base64 to plain text — with URL-safe mode, auto-detect, and size stats.

