ASCII 161
Inverted Exclamation Mark (¡)
Latin-1 Supplement
Latin-1 character.
Common uses & context
Decimal 161 (0xA1) is Inverted Exclamation Mark, part of the Latin-1 Supplement (128–255). Latin-1 character. It renders as '¡' and its binary byte is 10100001.
This is where single-byte ASCII ends and encoding matters. In Latin-1 (ISO-8859-1) '¡' is the single byte 0xA1. In UTF-8 — today's default for the web — the same character is the multi-byte sequence 0xC2 0xA1. Treating a Latin-1 byte as UTF-8 (or vice versa) is the usual reason accented letters and symbols turn into mojibake like é or €. The Unicode code point is U+00A1, and in HTML you can write it as ¡ or ¡.
All encodings at a glance
| Decimal | 161 |
| Hexadecimal | 0xA1 |
| Octal | 0241 |
| Binary | 10100001 |
| HTML numeric entity | ¡ |
| HTML named entity | ¡ |
| URL encoding | %A1 |
| UTF-8 bytes | 0xC2 0xA1 |
Code snippets
JavaScript
String.fromCharCode(161); // "¡"
161.toString(16); // "a1"Python
chr(161) # control char ¡
ord(chr(161)) # 161
hex(161) # '0xa1'HTML
¡ <!-- named entity -->
¡ <!-- numeric entity -->Programming notes
- ▸Single byte 0xA1 in Latin-1, but the multi-byte sequence 0xC2 0xA1 in UTF-8 — never assume one byte per character above code 127.
- ▸Unicode code point U+00A1; HTML entity ¡.
- ▸If '¡' shows as mojibake, the encoding declared and the encoding used disagree — align both on UTF-8.
Unicode & UTF-8 note
In Unicode this is U+00A1. In UTF-8 it encodes to the byte sequence 0xC2 0xA1. In legacy Latin-1 (ISO-8859-1) it is a single byte 0xA1, which is why Latin-1 files often appear as mojibake when interpreted as UTF-8.
Frequently asked questions
What character is ASCII code 161?
ASCII code 161 is the character '¡' (Inverted Exclamation Mark). In hexadecimal it is 0xA1, in octal 0241, and in binary 10100001.
What is 0xA1 in ASCII?
Hexadecimal 0xA1 equals decimal 161, which is the character '¡' (Inverted Exclamation Mark). To convert hex to ASCII yourself, read the two hex digits as a base-16 number (0xA1 = 161) and look up that code point.
How do I write the character with code 161 in code?
In JavaScript use String.fromCharCode(161); in Python use chr(161); in HTML use the numeric entity ¡ or the named entity ¡. In a URL it is percent-encoded as %A1, and in UTF-8 it is stored as the byte sequence 0xC2 0xA1.
Is '¡' part of standard ASCII?
No. Standard ASCII covers codes 0–127 only. '¡' is code 161, part of the Latin-1 Supplement (128–255, sometimes called "extended ASCII"). It is a single byte 0xA1 in Latin-1 but a multi-byte sequence (0xC2 0xA1) in UTF-8.