Skip to content

Tilde ~

The tilde (~) is a small wavy line. In casual writing it means “about,” as in ~5 minutes; in code it often means home directory or NOT. On a US keyboard, press Shift and the key left of 1.

U+007E · TILDE

Block: Basic Latin · Unicode 1.1 · Math symbol

How to type it

Windows
Win + . (period) opens the emoji & symbol panel
Microsoft Word
007E, then Alt + X
Mac
Control + Command + Space opens the Character Viewer
Linux (GTK/IBus)
Ctrl + Shift + U, 7e, Space

Codes for developers

Code point
U+007E
Unicode name
TILDE
HTML entity
~
CSS
content: "\007E";
JavaScript / JSON
"\u007E"
Python
"\u007E"
URL encoding
~
UTF-8
7E
UTF-16
007E

Look-alike characters

  • TILDE OPERATOR
  • SMALL TILDE
  • WAVE DASH
  • ALMOST EQUAL TO

What the tilde means

  • Approximately: ~5 minutes, ~$200. Common in notes, chats and technical writing. In formal text, write “about,” or use ≈ in math.
  • Home directory: on macOS, Linux and other Unix-like systems, ~ is your home folder, so ~/Documents is the Documents folder inside it.
  • Bitwise NOT: in C, Java, JavaScript and Python, ~x flips every bit of an integer.
  • Version ranges: in npm, ~1.2.3 allows patch updates (1.2.x) but not minor ones.
  • Statistics: X ~ N(0, 1) means X follows a standard normal distribution.
  • Old personal web pages: addresses like example.edu/~jsmith pointed to a user’s own page on a university server.

The tilde as an accent: ñ, ã, õ

As a diacritic, the tilde sits on top of a letter: ñ in Spanish (año, jalapeño, piñata) and ã or õ in Portuguese (São Paulo). These are separate letters, not a tilde typed next to n.

  • Mac: press Option+N, then the letter. Option+N followed by n gives ñ.
  • Windows: hold Alt and type 0241 for ñ or 0209 for Ñ on the numeric keypad. The US-International keyboard layout also lets you type the tilde key and then n.
  • iPhone and Android: long-press n and pick ñ.

Look-alikes: ˜ (small tilde) is a spacing accent mark, ∼ (tilde operator) is a math symbol, 〜 (wave dash) marks ranges in Japanese, and ≈ means “almost equal to.”

Finding the key and avoiding Markdown surprises

On US keyboards, the tilde shares a key with the backtick at the top left, below Esc. Press it with Shift. The key is in the same place on Mac and Windows keyboards.

In Markdown with GitHub-style extensions, tildes around text produce strikethrough. If a line like ~10 to ~20 people comes out crossed through, put a backslash before each tilde or wrap the text in a code span.

In URLs, the tilde is an unreserved character, so it never needs percent-encoding, although some older tools still turn it into %7E.

Frequently asked questions

Where is the tilde key on a keyboard?

On US keyboards, it is the key left of 1, below Esc. Hold Shift while pressing it to get ~.

What does ~ mean before a number?

Approximately. ~30 means about 30.

How do I type ñ?

On a Mac, press Option+N, then n. On Windows, hold Alt and type 0241 on the numeric keypad. On phones, long-press n.

What does ~ mean in a file path?

Your home folder on macOS and Linux. ~/Downloads is the Downloads folder in your home directory.

Unicode data: Unicode Character Database 18.0.0 (unicode.org).

More symbols

All symbols · Copy and paste symbols · Emoji search