ASCII Code Calculator
Convert a character to decimal, hex and binary codes.
Enter a single character
Results update as you type.
How it works
Computers store every character as a number, and this calculator reveals that number for any character in three common formats. You enter a character, and it returns its decimal code, its hexadecimal value, and its binary representation. For standard characters, letters, digits, and common punctuation, the code is the ASCII value, a system dating to the 1960s that assigns numbers 0 to 127 to English characters and control codes. For example, uppercase A is 65, lowercase a is 97, and the digit 0 is 48. The calculator shows the code in decimal, the everyday base-ten number, in hexadecimal, base sixteen, which is compact and widely used in programming and data formats, and in binary, base two, the eight-bit pattern of ones and zeros the computer actually stores. Understanding character codes is fundamental in programming, useful for tasks like sorting, case conversion (uppercase and lowercase letters differ by a fixed offset), parsing, encoding, and debugging. For characters beyond the ASCII range, such as accented letters, symbols, or emoji, the calculator returns the Unicode code point, the modern standard that extends far beyond ASCII to cover virtually all writing systems. Note that such characters may need more than eight bits to encode in practice. Enter a character to see its decimal, hexadecimal, and binary codes.
code = character's Unicode code point (ASCII for standard characters)
Every character has a numeric code point. For standard English letters, digits, and symbols this is the ASCII value from 0 to 127. The calculator reads the character's code point and expresses it in decimal, hexadecimal, and 8-bit binary, the common ways computers represent characters.
Source:ASCII / Unicode
We review all our tools from time to time to ensure accuracy.
Worked example
How to use this calculator
- 1
Enter your values
Enter character.
- 2
Adjust the options
Fine-tune any options to match your situation.
- 3
Read your result
Decimal code updates instantly as you type — no button to press.
Frequently asked questions
What is an ASCII code?
ASCII, the American Standard Code for Information Interchange, assigns a number from 0 to 127 to each standard English character and control code. For example, uppercase A is 65 and the space character is 32. These codes let computers store and process text as numbers, and ASCII underlies most modern text encoding.
How do I convert a character to its code?
Each character maps to a numeric code point. This calculator reads the character you enter and outputs its code in decimal, hexadecimal, and binary. For standard characters this is the ASCII value; for others it is the Unicode code point. You do not need to memorize any table, just enter the character.
Why are codes shown in hex and binary too?
Decimal is familiar, but programmers frequently use hexadecimal, which is compact and maps neatly to bytes, and binary, which shows the actual bits a computer stores. Character codes appear in all three across programming, data formats, and networking, so seeing all three helps in coding, debugging, and understanding how text is represented.
What about characters beyond ASCII?
Characters outside the basic ASCII set, such as accented letters, non-Latin scripts, symbols, and emoji, have Unicode code points above 127. The calculator returns the Unicode code point for these. In storage, such characters are typically encoded in UTF-8 using multiple bytes, so the simple 8-bit binary shown applies cleanly only to standard ASCII characters.
How is character code useful in programming?
Character codes enable many operations: sorting text, converting between uppercase and lowercase (which differ by a fixed offset in ASCII), checking whether a character is a letter or digit, encoding and decoding data, and parsing input. Understanding the numeric basis of characters is fundamental to string handling and low-level text processing.