ASCII / Unicode
Character ↔ code lookup
About This Calculator
ASCII (American Standard Code for Information Interchange) defines a 128-character set (codes 0-127) covering letters, digits, punctuation, and control characters. Unicode extends this to over 1.1 million characters covering every writing system. The ASCII/Unicode tool converts between characters and their numerical code points in decimal, hexadecimal, binary, and HTML entity format.
Formula
ASCII range: 0-127 (7-bit); Extended ASCII: 0-255 (8-bit)
Unicode code point: U+XXXX (hex); e.g. 'A' = U+0041
UTF-8 encoding: ASCII chars use 1 byte; others use 2-4 bytes
HTML entity: A or A or & (named)
Example Calculation
Find ASCII codes for 'A', 'a', '0', and space
- 'A' = decimal 65 = hex 41 = binary 01000001
- 'a' = decimal 97 = hex 61 = binary 01100001
- '0' = decimal 48 = hex 30 = binary 00110000
- Space = decimal 32 = hex 20 = binary 00100000
A=65, a=97, 0=48, Space=32
ASCII Code Ranges
| Range | Characters | Count |
|---|---|---|
| 0–31 | Control characters (NUL, TAB, LF, CR...) | 32 |
| 32–47 | Space, ! " # $ % & ' ( ) * + , - . / | 16 |
| 48–57 | Digits 0–9 | 10 |
| 58–64 | Punctuation : ; < = > ? @ | 7 |
| 65–90 | Uppercase A–Z | 26 |
| 91–96 | [ \ ] ^ _ ` | 6 |
| 97–122 | Lowercase a–z | 26 |
| 123–127 | { | } ~ DEL | 5 |
Frequently Asked Questions
What is the difference between ASCII and Unicode?
ASCII uses 7 bits to encode 128 characters (English letters, digits, basic punctuation). Unicode assigns code points to over 143,000 characters across all writing systems, emoji, and symbols. ASCII is a subset of Unicode — the first 128 Unicode code points match ASCII exactly.
What is UTF-8 and how does it differ from Unicode?
Unicode is the character set (assigning numbers to characters). UTF-8 is an encoding — how those numbers are stored as bytes. UTF-8 uses 1 byte for ASCII characters, 2 bytes for most Latin/Greek/Cyrillic characters, 3 bytes for CJK characters, and 4 bytes for emoji and rare characters.
What are control characters in ASCII?
Code points 0-31 and 127 are control characters — non-printable codes that control devices. Common ones: 9=TAB, 10=Line Feed (LF/newline in Unix), 13=Carriage Return (CR), 27=Escape, 32=Space. Windows uses CR+LF (\r\n) for newlines; Unix uses just LF (\n).
What are HTML entities?
HTML entities let you display reserved HTML characters (< > & " ') and special characters in HTML. Format: &name; (e.g. & for &) or &#decimal; (e.g. < for <) or &#xhex; (e.g. < for <). Essential for including user-generated text safely in HTML without XSS vulnerabilities.