Skip to content
ASCII World
~

Equivalency sign - tilde

PrintableASCII 126 | Hex 0x7E | U+007E
Tilde (ASCII 126) is the last printable character in the standard ASCII range. In Unix, ~ expands to the current user's home directory path. In C++, ~ClassName declares a destructor. In URLs, the tilde was commonly used for personal web pages on university servers in the 1990s (~username). In regular expressions, some engines use ~ for approximate matching. In Spanish and Portuguese, the tilde over n (ñ, ã) changes the consonant or vowel sound, making it a full diacritical mark rather than a decorative element.

ASCII Code

Decimal
126
Hexadecimal
0x7E
Octal
176
Binary
0111 1110
URL Escape
%7E

Unicode

Code Point
U+007E
Escape
\u007e
UTF-8 Hex
0x7E
UTF-8 Binary
01111110
UTF-16
0x007E
UTF-32
0x0000007E

HTML Entities

Numeric
~
Hex
~
Named
˜

How to Type

Windows Alt CodeAlt + 126
HTML Entity
~
Unicode InputU+007E

Source Code Representations

C / Java
"\u007E"
CSS
\007E
JavaScript
"\u007E"
Perl
\x{007E}
Python 2
u"\u007E"
Python 3
\u007E
Ruby
\u{007E}

Frequently Asked Questions

What is ASCII code 126?
ASCII code 126 represents the Equivalency sign - tilde character. In hexadecimal it is 0x7E, in binary 0111 1110, and in octal 176. It is a printable character that appears as "~" in text.
How do I type ASCII 126 on a keyboard?
On Windows, hold Alt and type 126 on the numeric keypad. On Mac, you can use the Character Viewer (Edit > Emoji & Symbols). In HTML, use the entity ~ or ~.