~

Tilde

Unicode
U+007E
Category
Punctuation
HTML Entity
~
CSS
\007E
The tilde (~) is the wavy line on the key left of 1 on a US keyboard. As a standalone ASCII character it means "approximately" (~5 minutes), marks a range in informal text, and softens or teases a phrase online ("see you soon~"). The same wave also exists as an accent sitting on top of letters — ñ in Spanish, ã and õ in Portuguese — which is a different, combining character.

On a US layout the tilde is Shift + the backtick key (`). On many European layouts it is a dead key: press it, then Space, to get a standalone ~. On an iPhone it is on the #+= page, on Android on the =\< page.

How to Type

Windows
Shift+` (US layout) · Alt+126
macOS
Shift+` (US layout)
Linux
Shift+` · Ctrl+Shift+U 7e
HTML
&#126;

In Programming

In Unix shells ~ expands to the home directory (cd ~, ~/Documents). In C, JavaScript and Python it is bitwise NOT (~x). It is also the regex-match operator in Perl, Ruby and Bash (=~), the "compatible version" range in npm (~1.2.3), the general sibling combinator in CSS (h2 ~ p) and strikethrough in Markdown (~~text~~).

Tags

tilde squiggly line wavy dash approximately alt 126 home directory keyboard symbol ascii punctuation

Related Symbols