Skip to content
ASCII World
_

Underscore

PrintableASCII 95 | Hex 0x5F | U+005F
Underscore (ASCII 95) is the only non-alphanumeric character included in most definitions of a "word character" in programming. In Python, leading underscores signal private attributes (_private), and double underscores trigger name mangling (__mangled). In SQL, the underscore is a single-character wildcard in LIKE patterns. C and most languages allow underscores in identifiers, and Python 3.6+ permits underscores as visual separators in numeric literals (1_000_000). The dunder (double underscore) pattern __init__, __str__ is unique to Python's data model.

ASCII Code

Decimal
95
Hexadecimal
0x5F
Octal
137
Binary
0101 1111
URL Escape
%5F

Unicode

Code Point
U+005F
Escape
\u005f
UTF-8 Hex
0x5F
UTF-8 Binary
01011111
UTF-16
0x005F
UTF-32
0x0000005F

HTML Entities

Numeric
_
Hex
_
Named
_

How to Type

Windows Alt CodeAlt + 95
HTML Entity
_
Unicode InputU+005F

Source Code Representations

C / Java
"\u005F"
CSS
\005F
JavaScript
"\u005F"
Perl
\x{005F}
Python 2
u"\u005F"
Python 3
\u005F
Ruby
\u{005F}

Frequently Asked Questions

What is ASCII code 95?
ASCII code 95 represents the Underscore character. In hexadecimal it is 0x5F, in binary 0101 1111, and in octal 137. It is a printable character that appears as "_" in text.
How do I type ASCII 95 on a keyboard?
On Windows, hold Alt and type 95 on the numeric keypad. On Mac, you can use the Character Viewer (Edit > Emoji & Symbols). In HTML, use the entity _ or _.