ASCII 33
Exclamation Mark (!)
Printable ASCII
Exclamation mark. Also used as the logical NOT in many programming languages.
Common uses & context
The character '!' — Exclamation Mark — has ASCII code 33 (0x21), octal 0041, binary 00100001. Exclamation mark. Also used as the logical NOT in many programming languages.
Punctuation and symbol codes carry the most syntactic weight per byte in programming: a single '!' can change how a parser reads an entire expression. When '!' needs to appear as literal data rather than syntax, you often have to escape it — in string literals, in regular expressions, in URLs (where it becomes %21), or in HTML. Knowing its exact code point (33) helps when you filter, validate, or sanitize input byte by byte.
All encodings at a glance
| Decimal | 33 |
| Hexadecimal | 0x21 |
| Octal | 0041 |
| Binary | 00100001 |
| HTML numeric entity | ! |
| URL encoding | %21 |
| UTF-8 bytes | 0x21 |
Code snippets
JavaScript
String.fromCharCode(33); // "!"
33.toString(16); // "21"Python
chr(33) # '!'
ord(chr(33)) # 33
hex(33) # '0x21'HTML
! <!-- numeric entity (no named entity for this character) -->Programming notes
- ▸Code 33 (0x21); URL-encoded form%21.
- ▸In HTML the numeric entity is !.
- ▸When used as literal data in regex or strings, '!' usually needs escaping — check the rules for your language.
Frequently asked questions
What character is ASCII code 33?
ASCII code 33 is the character '!' (Exclamation Mark). In hexadecimal it is 0x21, in octal 0041, and in binary 00100001.
What is 0x21 in ASCII?
Hexadecimal 0x21 equals decimal 33, which is the character '!' (Exclamation Mark). To convert hex to ASCII yourself, read the two hex digits as a base-16 number (0x21 = 33) and look up that code point.
How do I write the character with code 33 in code?
In JavaScript use String.fromCharCode(33); in Python use chr(33); in HTML use the numeric entity !. In a URL it is percent-encoded as %21, and in UTF-8 it is stored as the byte sequence 0x21.