Tilde (~)
The tilde ~ is Unicode U+007E, the wavy punctuation mark used for mathematical approximation, UNIX home directories, and diacritics. Press Copy to put it on your clipboard.
- Unicode
U+007E- HTML
~- Word
007E Alt+X
How to type the tilde (~)
The quickest way is to press Copy above and paste. To type ~ yourself, use the method for your device below.
Windows
- In Word or Outlook, type 007E and press Alt + X. Alt + X converts the hex code before the cursor into the character, and back again.
- Press Win + R, type charmap and press Enter. Tick “Advanced view”, search for Tilde, then Select and Copy. Character Map is built into every version of Windows.
Mac
- Press Control + Command + Space to open the Character Viewer, search for tilde and double-click it.
- With the Unicode Hex Input keyboard enabled (System Settings → Keyboard → Input Sources), hold Option and type 007E.
Linux & ChromeOS
- Press Ctrl + Shift + U, type 7e, then press Enter or Space. Works in GTK and IBus apps (GNOME, Firefox, Chrome, LibreOffice) and on ChromeOS.
iPhone & iPad
- Copy ~ from this page, then go to Settings → General → Keyboard → Text Replacement and add it with a shortcut such as ;tild. The shortcut then turns into the symbol as you type, in every app.
Android
- In Gboard, tap ?123, then =\<. ~ is on that page.
- Copy ~ here, then open Gboard settings → Dictionary → Personal dictionary and add it with a shortcut.
Microsoft Word
- Type 007E, then press Alt + X.
- Insert → Symbol → More Symbols. Set “from” to Unicode (hex), type 007E in “Character code” and click Insert.
Google Docs
- Insert → Special characters, then search for “tilde” or draw it in the box.
Excel & Google Sheets
- Enter
=UNICHAR(126)in a cell. It works in Excel 2013 and later and in Google Sheets.
HTML
- Write
~or~in your HTML.
What does ~ mean?
The ~ symbol, known in Unicode as TILDE (U+007E), is an ancient typographic mark whose versatility spans linguistics, mathematics, logic, and computer systems. Its name derives from the Latin titulus, meaning a superscription or label. In medieval Latin manuscripts, scribes wrote a small wavy mark above letters to save expensive parchment by abbreviating repeated vowels or nasal consonants like 'n' or 'm'. This diacritical practice survives prominently in Spanish (as in the ñ of año) and Portuguese (as in são). When the character was incorporated into typewriter keyboards and ASCII in the 1960s, it was given its own standalone spacing code point.
In modern desktop computing, the tilde performs crucial operational roles. In UNIX, Linux, and macOS terminal command shells, a lone tilde ~ represents the current logged-in user's home directory path, so typing cd ~/Documents instantly navigates to personal files. In informal writing, casual notes, and price estimates, placing a tilde before a numeral signifies "approximately" or "around" (such as "~50 people"), acting as a convenient stand-in for the mathematical approximately equal symbol ≈.
In programming, ~ serves as the bitwise NOT (inversion) operator in C, C++, JavaScript, and Python, and denotes destructor functions in C++. In web development, it functions as a general sibling selector in CSS rule sets. Explore related characters like the caret symbol ^, the backslash \, and the vertical bar | in our keyboard symbols catalogue.
Common uses
- UNIX home directories: shorthand for the user's home path in terminal shells (e.g.,
~/.config) - Informal estimation: indicating approximate amounts in casual text (e.g., "~20 minutes away")
- Computer programming: bitwise NOT operator in C, C++, Java, and Python, or destructor syntax in C++
- CSS selectors: general sibling combinator matching elements preceded by a sibling (e.g.,
h2 ~ p)
Tilde codes for HTML, CSS and programming
Every code below produces ~. Use the HTML entity in web pages, the CSS escape in content, and the escape sequence in source code.
| Unicode code point | U+007E | |
|---|---|---|
| HTML decimal | ~ | |
| HTML hex | ~ | |
| CSS content | content: "\7E"; | |
| JavaScript | "\u007E" | |
| Python | "\u007E" | |
| Python (by name) | "\N{TILDE}" | |
| Java / C# | "\u007E" | |
| UTF-8 bytes | 7E | |
| UTF-16 | 007E | |
| URL encoded | ~ |
~ vs look-alike characters
These characters look similar to ~ but have a different meaning and code. Pasting the wrong one can break search, sorting and screen readers.
| Char | Name | When to use it |
|---|---|---|
Small TildeU+02DC | Small tilde, a non-combining spacing accent mark (U+02DC). | |
Tilde OperatorU+223C | Tilde operator, a mathematical relation glyph representing proportionality or geometric similarity. | |
Almost Equal toU+2248 | Almost equal to (double tilde), the formal mathematical sign for numerical approximation. | |
Swung DashU+2053 | Swung dash, a distinct elongated punctuation mark used in dictionaries to represent word omission. |
Symbols similar to ~
Click to copy, or open a symbol for its codes. See the full keyboard symbols collection.
~ character properties
- Official Unicode name
- TILDE
- Also known as
- tilde symbol, twiddle, squiggle, approximate symbol, swung dash
- Code point
- U+007E
- Unicode block
- Basic Latin (U+0000–U+007F)
- General category
- Math symbol (Sm)
- Added in
- Unicode 1.1 (1993)
- Plane
- Basic Multilingual Plane (0)
- Emoji
- No, it is a text symbol
Frequently asked questions
Where is the tilde located on the keyboard?
On standard US keyboards, the tilde ~ sits on the top-left key directly below Escape, accessed by pressing Shift + ` (backtick). On UK keyboards, it is located on the middle row beside the Enter key, typed with Shift + #.
Why does ~ represent the home directory in UNIX?
In the late 1970s, the Lear Siegler ADM-3A terminal used by early UNIX developers at Berkeley placed the tilde on the exact same keycap as "Home", establishing ~ as the lasting shorthand for home directories.
How does a standalone tilde differ from the accent on ñ?
The keyboard tilde ~ (U+007E) is a standalone spacing character. The diacritic in letters like ñ (U+00F1) is either precomposed into the letter itself or typed as a combining tilde (U+0303) that sits over the letter without advancing the cursor.
What is the alt code for the tilde?
On Windows, hold Alt and type 126 on the numeric keypad to get ~. On a laptop without a keypad, copy it from this page or use 007E then Alt + X in Word.
How do I type the tilde on a Mac?
There is no single Option shortcut for ~ on the US layout. Press Control + Command + Space to open the Character Viewer, search for “tilde” and double-click it, or copy it from this page.
What is the HTML code for the tilde?
~ has no named HTML entity. Use the numeric reference ~ or ~, or paste the character directly into a UTF-8 page.
What is the Unicode for the tilde?
~ is U+007E, officially named TILDE, in the Basic Latin block. It has been part of Unicode since version 1.1 (1993).