How to type ~ on Windows
The tilde symbol has no short Alt code. The quickest option is to copy it from the top of this page and paste it with Ctrl+V.
No numeric keypad?
Press Win+. to open the emoji panel, choose the Symbols tab (Ω) and search for "tilde". Or open Character Map from the Start menu, find ~, click Select, then Copy.
How to type ~ on a Mac
There is no direct keyboard shortcut for ~ on a Mac.
For any symbol, the Character Viewer works: press Control+⌘+Space, type "tilde" in the search box and double-click the result. It will be remembered under Frequently Used.
How to type ~ on iPhone and iPad
The iOS keyboard does not include ~, so the reliable way is to copy it from this page, then press and hold in any text field and tap Paste.
If you use it often, create a shortcut: open Settings → General → Keyboard → Text Replacement, paste ~ in the Phrase field and type a short code such as ;tilde in the Shortcut field. Typing that code will then insert ~ anywhere.
How to type ~ on Android
Copy the symbol from this page, then long-press in a text field and choose Paste. Gboard also keeps a clipboard history: tap the clipboard icon on the toolbar to paste it again later.
For a permanent shortcut, open Gboard settings → Dictionary → Personal dictionary, add ~ as the word and a short code as the shortcut.
How to type ~ in Microsoft Word
- Type the Unicode hex code 007E where you want the symbol.
- Press Alt+X. Word converts the code into ~.
This works on Windows in Word, Outlook and OneNote and needs no numeric keypad. You can also go to Insert → Symbol → More Symbols, set the font to a Unicode font and type 007E in the Character code box. In Excel, the formula =UNICHAR(126) returns the symbol.
How to type ~ in Google Docs
Open Insert → Special characters, then either search for "tilde" or draw the symbol in the sketch box. Click the result to insert it. In Google Sheets, use =CHAR(126).
~ in HTML, CSS and code
| Format | Code |
|---|---|
| HTML entity | ~ |
| HTML decimal | ~ |
| HTML hex | ~ |
CSS content | "\007E" |
| JavaScript | "\u007E" |
| Python | "\u007E" |
| URL encoded | ~ |
Because ~ is a standard Unicode character (U+007E), you can also paste it directly into any UTF-8 file. The escaped forms above are only needed when the file encoding is uncertain or the symbol must be entered on a keyboard without it.
Where the tilde symbol is used
It commonly shows approximate values, as in "~50 people" or "~10 minutes," and marks file paths for home directories in Unix systems, like "~/Documents". In math it can denote similarity or equivalence between expressions. Don't confuse it with the swung dash or the accent used in Spanish over letters like "ñ".
Frequently asked questions
What does the tilde mean before a number? +
It means approximately, so "~100" means roughly 100, not exactly 100.
Why is there a tilde in a file path? +
In Unix-based systems, a tilde at the start of a path represents the current user's home directory, shortening long file locations.
What is the Alt code for the tilde symbol? +
The tilde symbol has no short Alt code. Copy it from this page, or in Word type 007E and press Alt + X.
How do I type ~ on a Mac? +
There is no dedicated Mac shortcut for ~. Open the Character Viewer with Control + Command + Space, search for "tilde", and double-click it. Or copy it from this page.
How do I type the tilde symbol on iPhone or Android? +
Phone keyboards do not include ~ by default. Copy it from this page and paste it, or add it as a text replacement shortcut in Settings so you can type it with a short abbreviation.
What is the HTML code for ~? +
Use ~ in HTML. In CSS use content: "\007E" and in JavaScript use "\u007E".