Tilde Symbol ~ Copy and Paste — Meaning, Uses & How to Type It
~
Tap or click to select · Copy with Ctrl+C / Cmd+C
That little squiggly line sitting above your Tab key? That is the tilde ~. It looks unassuming, but it has more uses than almost any other special character. Spanish language, mathematics, programming, URLs, file paths, text formatting — the tilde shows up everywhere.
Quick Copy
Tilde
Unicode: U+007E | HTML: ˜
N with Tilde (eñe)
Unicode: U+00F1
Capital N with Tilde
Unicode: U+00D1
Almost Equal To
Unicode: U+2248 (double tilde)
What Does the Tilde Mean?
In Mathematics
- Approximately equal: ~ means "approximately" or "similar to" (e.g., pi ~ 3.14)
- Equivalence relation: a ~ b means a is equivalent to b under some relation
- Asymptotic notation: f(x) ~ g(x) means the ratio approaches 1
- Negation (logic): ~P means "not P"
In Spanish and Other Languages
The tilde over n creates the ñ character, pronounced "en-yay." It represents a palatal nasal sound. Spanish words like señor, mañana, and jalapeño all use it. The tilde also appears in Portuguese (ã, õ), Vietnamese, and other languages.
In Programming
- Home directory: ~/ refers to the current user's home folder in Unix/Linux
- Bitwise NOT: ~x flips all bits in a number
- Destructor: ~ClassName() in C++ marks a destructor
- Pattern matching: Used in regular expressions and glob patterns
In URLs and File Paths
In URLs, ~ often indicates a personal website: example.com/~username. This convention dates back to early Unix web servers where user directories were accessed with the tilde prefix.
In Everyday Text
- Informal approximation: "~30 minutes" means approximately 30 minutes
- Text decoration: Sometimes used decoratively in social media posts or informal writing
- Chat shorthand: In some online communities, trailing tildes add a playful tone: "okay~~"
How to Type the Tilde Symbol
Windows
- Standard tilde: Shift + ` (key above Tab, left of 1)
- Spanish ñ: Hold Alt, type 164 (numeric keypad) for lowercase ñ, or 165 for Ñ
Mac
- Standard tilde: Shift + ` (same key as Windows)
- Spanish ñ: Option + n, then type n
Mobile (iOS / Android)
- Press and hold the n key to get ñ
- For standalone tilde, switch to symbols keyboard
Tilde in Different Programming Languages
JavaScript / TypeScript
Bitwise NOT: ~5 equals -6. Also used in jQuery for sibling selectors.
Python
Bitwise complement and home directory expansion: os.path.expanduser("~/")
C++
Destructor syntax: ~MyClass(). Also bitwise NOT operator.
CSS
General sibling combinator: h2 ~ p selects all paragraphs that are siblings of h2.
Related Symbols
Tilde
Almost Equal
Eñe
Caret
Backtick
Overline
The tilde is one of the most versatile characters on your keyboard. Whether you need it for Spanish text, a home directory path, or mathematical notation, just grab it from above.