DevKits

ASCII 87

Latin Capital Letter W (W)

Printable ASCII

Uppercase letter W. ASCII code 87. In regex, \w matches word characters (letters, digits, underscore) — the lowercase w after a backslash, not this glyph.

Common uses & context

Theuppercase letter 'W' has ASCII code 87 (0x57). Its lowercase twin 'w' sits exactly 32 code points away at 119. 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 W. ASCII code 87. In regex, \w matches word characters (letters, digits, underscore) — the lowercase w after a backslash, not this glyph.

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 'W' to its lowercase form youset bit 5: 'W' | 0x20 gives 'w'. 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

Decimal87
Hexadecimal0x57
Octal0127
Binary01010111
HTML numeric entity&#87;
URL encoding%57
UTF-8 bytes0x57

Code snippets

JavaScript

String.fromCharCode(87); // "W"
87.toString(16); // "57"

Python

chr(87)           # 'W'
ord(chr(87))      # 87
hex(87)           # '0x57'

HTML

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

Programming notes

  • Case toggle: 'W' | 0x20 = 'w' (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 87?

ASCII code 87 is the character 'W' (Latin Capital Letter W). In hexadecimal it is 0x57, in octal 0127, and in binary 01010111.

What is 0x57 in ASCII?

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

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

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

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

'W' is code 87; its lowercase counterpart 'w' is code 119. The two always differ by 32, so you can convert by adding 32 (or setting bit 0x20).

Nearby codes

Encode & convert this character