Loading...
Loading...
Type any text and see the ASCII decimal code for each character, displayed side by side. Output updates as you type.
Text characters to convert
ASCII code values (space-separated)
ASCII stands for American Standard Code for Information Interchange. It was first published in 1963 as a 7-bit character encoding standard. The goal was to give every commonly used character a fixed numeric code so that different computers and communication systems could exchange text reliably.
The standard covers 128 code points. Codes 0 through 31 are control characters - non-printable instructions like tab (9), line feed (10), and carriage return (13). Codes 32 through 126 are printable characters: space (32), digits 0-9 (codes 48-57), uppercase letters A-Z (codes 65-90), lowercase letters a-z (codes 97-122), and a range of punctuation marks. Code 127 is the delete character, also non-printable.
ASCII became the foundation for nearly all modern character encodings. UTF-8 - the dominant encoding on the web today - is a strict superset of ASCII: the first 128 code points are identical, stored as single bytes. This means any file containing only ASCII characters is also valid UTF-8.
Knowing the ranges helps when you need to write character classification logic. Digits span 48 to 57. To check if a character is a digit, compare its ASCII code against those bounds. Uppercase letters span 65 to 90; lowercase span 97 to 122. The gap between uppercase and lowercase is exactly 32, which means you can toggle case by adding or subtracting 32, or by flipping bit 5.
Punctuation is spread across several ranges: 33-47, 58-64, 91-96, and 123-126. If you need to strip or allow only specific character classes, knowing these ranges lets you write precise range checks rather than long lists of individual characters.
This converter shows you the exact code for any character, including ones you might not know off the top of your head - such as the backtick (96), the tilde (126), or the vertical bar (124).
Languages like Python provide an ord() function that returns the ASCII or Unicode code point for a character. JavaScript uses charCodeAt(). C compares char values directly as integers. When you are working with string manipulation at the byte level - input validation, encoding, protocol parsing - knowing the exact code point for a character is often necessary.
This tool is faster than looking up a chart or writing a one-liner to print code points. Paste the characters you are working with and read their codes directly.
What is the ASCII code for a space?
Space is ASCII code 32. It is the first printable character in the ASCII table. Codes 0 through 31 are all non-printable control characters.
Why is there a gap of 32 between uppercase and lowercase letters?
The gap is 32 because 32 is 2⁵, which is exactly one bit in position 5. Uppercase letters have bit 5 set to 0; lowercase letters have it set to 1. This makes case conversion a single bitwise operation, which was useful on early hardware.
Does this tool handle characters outside the ASCII range?
The tool returns the Unicode code point for any character you type. For ASCII characters (0-127), the Unicode code point and the ASCII code are identical. For characters outside that range - such as accented letters or emoji - the tool returns the Unicode code point, not a byte value from any multi-byte encoding.