ASCII Code Converter
Type any character to see its ASCII code in decimal, hex, binary and octal, or enter a code to find the character.
Reviewed by the ToolNestr Editorial Team — July 2026
How ASCII code conversion works
ASCII (American Standard Code for Information Interchange) assigns a unique 7-bit numeric code (0–127) to each character. The converter maps characters to their ASCII decimal values using JavaScript's charCodeAt() method, then converts that decimal value to other common representations — hexadecimal (base-16), binary (base-2), and octal (base-8).
For the reverse direction (code to character), the converter accepts a decimal number between 0 and 255 and returns the corresponding character using String.fromCharCode(). The tool also identifies the character's category — control character (0–31, 127), printable (32–126), or extended ASCII (128–255) — and shows its HTML entity and control character name where applicable.
Worked example
ASCII character categories
Distribution of characters across the full ASCII table.
Priya Nair
Developer who needs to check ASCII codes when implementing custom serial protocols and debugging character encoding issues in network applications.
Liam O'Brien
CS student learning about character encoding, binary representation, and how computers store text at the fundamental level.
Yuki Tanaka
Embedded engineer who works with microcontrollers that use ASCII for serial communication and needs to convert between characters and hex codes.
Alex Rivera
Cybersecurity analyst who inspects raw packet data and needs to identify control characters and their hex values in network traffic dumps.
| Dec | Hex | Char | Dec | Hex | Char | Dec | Hex | Char |
|---|---|---|---|---|---|---|---|---|
| 32 | 20 | Space | 64 | 40 | @ | 96 | 60 | ` |
| 33 | 21 | ! | 65 | 41 | A | 97 | 61 | a |
| 34 | 22 | " | 66 | 42 | B | 98 | 62 | b |
| 35 | 23 | # | 67 | 43 | C | 99 | 63 | c |
| 36 | 24 | $ | 68 | 44 | D | 100 | 64 | d |
| 37 | 25 | % | 69 | 45 | E | 101 | 65 | e |
| 38 | 26 | & | 70 | 46 | F | 102 | 66 | f |
| 39 | 27 | ' | 71 | 47 | G | 103 | 67 | g |
| 40 | 28 | ( | 72 | 48 | H | 104 | 68 | h |
| 41 | 29 | ) | 73 | 49 | I | 105 | 69 | i |
| 42 | 2A | * | 74 | 4A | J | 106 | 6A | j |
| 43 | 2B | + | 75 | 4B | K | 107 | 6B | k |
| 44 | 2C | , | 76 | 4C | L | 108 | 6C | l |
| 45 | 2D | - | 77 | 4D | M | 109 | 6D | m |
| 46 | 2E | . | 78 | 4E | N | 110 | 6E | n |
| 47 | 2F | / | 79 | 4F | O | 111 | 6F | o |
| 48 | 30 | 0 | 80 | 50 | P | 112 | 70 | p |
| 49 | 31 | 1 | 81 | 51 | Q | 113 | 71 | q |
| 50 | 32 | 2 | 82 | 52 | R | 114 | 72 | r |
| 51 | 33 | 3 | 83 | 53 | S | 115 | 73 | s |
| 52 | 34 | 4 | 84 | 54 | T | 116 | 74 | t |
| 53 | 35 | 5 | 85 | 55 | U | 117 | 75 | u |
| 54 | 36 | 6 | 86 | 56 | V | 118 | 76 | v |
| 55 | 37 | 7 | 87 | 57 | W | 119 | 77 | w |
| 56 | 38 | 8 | 88 | 58 | X | 120 | 78 | x |
| 57 | 39 | 9 | 89 | 59 | Y | 121 | 79 | y |
| 58 | 3A | : | 90 | 5A | Z | 122 | 7A | z |
| 59 | 3B | ; | 91 | 5B | [ | 123 | 7B | |
| 60 | 3C | < | 92 | 5C | \ | 124 | 7C | | |
| 61 | 3D | = | 93 | 5D | ] | 125 | 7D | |
| 62 | 3E | > | 94 | 5E | ^ | 126 | 7E | ~ |
| 63 | 3F | ? | 95 | 5F | _ | 127 | 7F | DEL |
How to use ASCII Code Converter
Enter input
Type a character or string to convert to codes, or enter a decimal ASCII code (0–255) to find the character.
Choose direction
Click Char → Code to see decimal, hex, binary, and octal values. Click Code → Char to find the character from a numeric code.
Read the results
View all representations side by side, plus the HTML entity and character category (control, printable, or extended).
Tips for ASCII codes
Remember the key offsets
A = 65, a = 97 (difference of 32). 0 = 48. Space = 32. These anchor points make it easy to compute other codes mentally: B = 66, b = 98, 1 = 49, etc.
Use hex codes in programming
Many programming languages use hex notation for characters (\\x41 for A). The hexadecimal view is especially useful when working with network protocols, binary files, or embedded systems.
Know your control characters
Common control characters include NUL (0), TAB (9), LF (10), CR (13), and ESC (27). These appear frequently in text processing and serial communication. The converter identifies them by category.
What is ASCII?
ASCII (American Standard Code for Information Interchange) is a character encoding standard developed in the 1960s. It uses 7 bits to represent 128 characters including uppercase and lowercase letters, digits 0–9, punctuation marks, and control characters. ASCII became the foundation for digital text communication and is still the basis for modern character encodings like UTF-8.
ASCII vs Unicode
While ASCII covers only 128 characters (enough for English), Unicode can represent over a million characters from every writing system in the world. The first 128 Unicode code points are identical to ASCII, ensuring backward compatibility. Unicode uses variable-length encoding (UTF-8, UTF-16, UTF-32) where ASCII-compatible characters use just one byte, making UTF-8 the dominant encoding on the web.
Character categories
ASCII divides into three main groups. Control characters (0–31) are non-printable codes that originally controlled teletype machines — they include common ones like LF (line feed) and TAB still used today. Printable characters (32–126) include space, digits, punctuation, and letters. The DEL character (127) is a special control character used as a delete command.
Control characters explained
Control characters were essential for managing early teletype and terminal communication. NUL (0) is a null filler. SOH (1) Start of Heading, STX (2) Start of Text, ETX (3) End of Text. BEL (7) rang a bell. BS (8) backspace. HT (9) horizontal tab. LF (10) line feed. CR (13) carriage return. ESC (27) escape. Many of these persist in modern protocols and file formats.
Frequently asked questions
What is ASCII?
ASCII (American Standard Code for Information Interchange) is a character encoding standard that assigns numeric codes to letters, digits, punctuation, and control characters. It uses 7 bits to represent 128 characters (0–127).
What is the difference between ASCII and Unicode?
ASCII is a 7-bit encoding covering 128 characters. Unicode is a much larger standard that can represent over a million characters from all writing systems. The first 128 Unicode code points are identical to ASCII for backward compatibility.
What are the ASCII character categories?
ASCII divides into three groups: control characters (0–31) for non-printable functions, printable characters (32–126) including letters, digits, and punctuation, and DEL (127) which is a special control character.
What are control characters used for?
Control characters (0–31) were designed for teletype and terminal control. Examples include NUL (null), LF (line feed), CR (carriage return), TAB (horizontal tab), and ESC (escape). Many are still used in text protocols today.
How do I convert a character to ASCII code?
Type a single character in the input field and click Convert. The tool shows its ASCII code in decimal, hexadecimal, binary, and octal formats, plus its HTML entity and category.
Can I convert multiple characters at once?
Yes. Enter a string of characters and the tool will show the code for each character. For bulk conversion, each character displays its own set of codes.
What is the ASCII code for space?
The space character has ASCII decimal code 32, hexadecimal 20, binary 00100000, and octal 40. It is classified as a printable character.
What is extended ASCII?
Extended ASCII refers to 8-bit encodings (128–255) that vary by character set. Code page 437 (IBM PC) and ISO 8859-1 (Latin-1) are common extended ASCII variants with different characters in positions 128–255.
Why does my converted character show 63?
63 is the ASCII code for a question mark (?). Some characters cannot be represented in ASCII and are converted to a question mark by the browser. Use the character-to-code mode to check if your character has a valid ASCII code.
Is ASCII case-sensitive?
Yes. Uppercase A (65) and lowercase a (97) have different ASCII codes. They differ by exactly 32 in decimal, which is a single bit flip in binary.