DevKits

ASCII 81

Latin Capital Letter Q (Q)

Printable ASCII

Uppercase letter Q. ASCII code 81. Lowercase 'q' is 113.

Common uses & context

Theuppercase letter 'Q' has ASCII code 81 (0x51). Its lowercase twin 'q' sits exactly 32 code points away at 113. That constant gap of 32 — a single bit, 0x20 — is why changing letter case is one of the cheapest operations a CPU can do: you flip or mask one bit rather than looking anything up. Uppercase letter Q. ASCII code 81. Lowercase 'q' is 113.

The uppercase Latin letters form the contiguous block 65–90, so range checks like c >= 'A' && c <= 'Z' work without a lookup table. To convert 'Q' to its lowercase form youset bit 5: 'Q' | 0x20 gives 'q'. Because uppercase (65–90) sorts before lowercase (97–122) in raw byte order, naive sorting places every capitalized wordahead of every lowercase one — the reason "Zebra" comes before "apple" unless you sort case-insensitively.

All encodings at a glance

Decimal81
Hexadecimal0x51
Octal0121
Binary01010001
HTML numeric entity&#81;
URL encoding%51
UTF-8 bytes0x51

Code snippets

JavaScript

String.fromCharCode(81); // "Q"
81.toString(16); // "51"

Python

chr(81)           # 'Q'
ord(chr(81))      # 81
hex(81)           # '0x51'

HTML

&#81;   <!-- numeric entity (no named entity for this character) -->

Programming notes

  • Case toggle: 'Q' | 0x20 = 'q' (a single-bit change).
  • Letter test: c >= 'A' && c <= 'Z' — the uppercase block is contiguous (65–90).

Frequently asked questions

What character is ASCII code 81?

ASCII code 81 is the character 'Q' (Latin Capital Letter Q). In hexadecimal it is 0x51, in octal 0121, and in binary 01010001.

What is 0x51 in ASCII?

Hexadecimal 0x51 equals decimal 81, which is the character 'Q' (Latin Capital Letter Q). To convert hex to ASCII yourself, read the two hex digits as a base-16 number (0x51 = 81) and look up that code point.

How do I write the character with code 81 in code?

In JavaScript use String.fromCharCode(81); in Python use chr(81); in HTML use the numeric entity &#81;. In a URL it is percent-encoded as %51, and in UTF-8 it is stored as the byte sequence 0x51.

What is the lowercase form of 'Q' in ASCII?

'Q' is code 81; its lowercase counterpart 'q' is code 113. The two always differ by 32, so you can convert by adding 32 (or setting bit 0x20).

Nearby codes

Encode & convert this character