WebToolsPlanet
Converter Tools

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

Client-Side Processing
Input Data Stays on Device
Instant Local Execution

Find this tool useful? Support the project to keep it free!

Buy me a coffee

What 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

1

Type or paste text into the input field

2

Choose the output format: Decimal, Hex, or Octal

3

Choose the separator: Space, Comma, or Newline

4

The ASCII codes for every character appear instantly in the output panel

5

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.

Character input
Hi!
ASCII codes (decimal)
72 105 33

Privacy

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.