~

ASCII Character: Tilde

ASCII Code 126 · Unicode U+007E · Hex 0x7E

About the Tilde Character

ASCII code 126 (0x7E) represents the Tilde character "~". The "Tilde" character (~) with ASCII code 126 is a punctuation or special symbol in the printable ASCII range. Punctuation characters serve important roles in both natural language writing and programming syntax. The printable ASCII characters (codes 32–126) include the space, digits, uppercase and lowercase Latin letters, and common punctuation symbols. These 95 characters form the foundation of text representation in virtually all computing systems and are universally supported across all character encodings, programming languages, and operating systems.

Encoding Details

ASCII Code 126
Hexadecimal 0x7E
Octal 176
Binary 01111110
Unicode U+007E
Unicode Name TILDE
HTML Numeric ~
HTML Entity ˜
URL Escape %7E
UTF-8 (Hex) 7E
Quoted-Printable ~

Source Code Examples

JavaScript
// Character literal
let char = '~';
// Using char code
let char2 = String.fromCharCode(126);
// Unicode escape
let char3 = '\x7E';
Python
# Character literal
char = '~'
# Using chr()
char = chr(126)
# Using ord() to get code
code = ord('~')  # Returns 126
HTML
<!-- Direct character -->
~
<!-- HTML entity (numeric) -->
&#126;
<!-- Hex entity -->
&#x7E;
C#
// Character literal
char c = '~';
// Using cast
char c2 = (char)126;
// To get code from char
int code = (int)'~';  // Returns 126

Navigate

Copied!