Unicode / ASCII Simulator
See how characters are stored as numbers in ASCII, UTF-8 and UTF-16, with an interactive ASCII table.
Type some text
Every character is stored as a number (its code). The character set decides which number.
| Character | Denary code | Unicode code point | Binary stored | Bits |
|---|---|---|---|---|
| H | 72 | U+0048 | 1001000 | 7 (8 stored) |
| i | 105 | U+0069 | 1101001 | 7 (8 stored) |
| ! | 33 | U+0021 | 0100001 | 7 (8 stored) |
| ␣ (space) | 32 | U+0020 | 0100000 | 7 (8 stored) |
| c | 99 | U+0063 | 1100011 | 7 (8 stored) |
| a | 97 | U+0061 | 1100001 | 7 (8 stored) |
| f | 102 | U+0066 | 1100110 | 7 (8 stored) |
| é | 233 | U+00E9 | not in ASCII | — |
| ␣ (space) | 32 | U+0020 | 0100000 | 7 (8 stored) |
| 😀 | 128512 | U+1F600 | not in ASCII | — |
ASCII table (printable characters 32–126)
Click a character to see its code.
Character "A"
About This Simulation
This Unicode and ASCII simulator shows how text is stored as numbers. Type any text to see each character's code in denary, hexadecimal and binary, and how many bits it needs in ASCII, UTF-8, UTF-16 and UTF-32. An interactive ASCII table shows the patterns between codes.
Features
- Character-by-character table of codes for your own text
- ASCII, UTF-8 and UTF-16 binary encodings
- Total storage compared across ASCII, extended ASCII, UTF-8, UTF-16 and UTF-32
- Warnings for characters that ASCII cannot store
- Clickable ASCII table with upper/lower case and digit patterns
Topics covered
- Character Sets
- ASCII
- Extended ASCII
- Unicode
- UTF-8 and UTF-16
- Binary Representation of Text
Explanation
A character set is a list of characters with a unique number (code) for each one. ASCII uses 7 bits for 128 characters: English letters, digits, punctuation and control codes. Unicode gives a code to over a million characters, covering every writing system and emoji, and is stored using encodings such as UTF-8 and UTF-16.
How it works
- Each character is looked up in the character set to get its code, e.g. 'A' = 65.
- The code is stored in binary: 65 = 1000001 in 7-bit ASCII.
- Codes are in order, so 'B' = 66 and 'a' = 97. Upper and lower case differ by exactly 32.
- Digit characters are not their values: '0' is 48, so subtract 48 to get the number.
- UTF-8 uses 1 byte for ASCII characters and 2–4 bytes for others, so English text stays small while any character can be stored.
Why it matters
Character sets are on the IGCSE and AS Level syllabuses, and understanding encodings is essential when handling files, web pages and databases. Many bugs ('garbled' text) come from reading text with the wrong encoding.
Frequently Asked Questions
What is the difference between ASCII and Unicode?
ASCII has 128 characters stored in 7 bits and only covers English. Unicode has codes for over a million characters from all languages, and its first 128 codes are the same as ASCII.
Why does Unicode use more storage?
It needs more bits per character to represent far more characters. UTF-8 reduces this by using only 1 byte for common ASCII characters.
What is extended ASCII?
An 8-bit version of ASCII with 256 characters. The extra 128 codes hold symbols and accented letters, but they vary between systems.
What is the ASCII code for 'A' and 'a'?
'A' is 65 (1000001) and 'a' is 97 (1100001). They differ by 32.
Related Simulations
Number Systems
Number System Converter
Convert between binary, decimal, hex, octal
Data Representation
Huffman Coding Simulator
Build a Huffman tree from character frequencies one merge at a time, read off the prefix codes and compare the bits with ASCII.
Number Systems
BCD Representation Simulator
Store each denary digit as a 4-bit nibble, compare BCD with pure binary and add BCD numbers with the +6 correction.
Data Representation
Bitmap File Size Simulator
Calculate image file size from resolution and colour depth, with a live preview of how colour depth changes the image.

