Squiggly Line Keyboard Shortcut: How to Type a Tilde
In this article
To do a squiggly line (known as a tilde) on a standard English keyboard, press and hold the Shift key and then press the key located just below the Esc key and to the left of the number 1. This character (~) is used in various contexts, from mathematics and programming to indicating an approximation in casual writing.
The tilde is a versatile symbol. In linguistics, it is used as a diacritic mark over letters (like the ñ in Spanish) to change the sound of the letter. In computing, it often represents the home directory in Unix-based systems or is used as a bitwise NOT operator in languages like C++. For most users, however, it is simply a way to signify "roughly" or "approximately" when writing numbers, such as ~50 people.
What You'll Need
- A physical QWERTY keyboard (Windows or macOS) or a virtual keyboard on a mobile device.
- A device connected to a text editor, word processor, or web browser.
- Basic knowledge of the Shift key function.
Step-by-Step
- Locate the Tilde Key: Look at the top-left corner of your keyboard. Find the key that sits directly below the Escape (Esc) key. On most standard US English keyboards, this key shares space with the backtick (`) symbol.
- Hold the Shift Key: Press and hold down either the left or right Shift key. The tilde is the "upper" character on that specific key, meaning it requires the Shift modifier to be activated.
- Press the Tilde Key: While keeping the Shift key held down, tap the key below the Esc key once.
- Release Both Keys: Let go of the tilde key first, then release the Shift key. The symbol (~) should now appear at your cursor point.
- Alternative for Non-US Keyboards: If you are using a UK keyboard, the tilde may be located in a different position, often near the Enter key or combined with other symbols. Check the key labels for the squiggly line and use the Shift key combination accordingly.
- Using Alt Codes (Windows): If your physical key is broken, you can use the numeric keypad. Hold the Alt key and type 126 on the number pad, then release Alt.
- Using Option Keys (Mac): On some international Mac layouts, you can produce a tilde by pressing Option + N (for a tilde over a letter) or by using the dedicated key in the top left with the Shift modifier.
- Mobile Devices (iOS/Android): Open the keyboard and tap the 123 or ?123 button to switch to the numeric and symbol layout. If the tilde is not on the first symbol page, tap the secondary symbol key (often labeled #+= or similar) to find the ~ character.
Common Mistakes
One of the most frequent errors is forgetting to hold the Shift key. If you press the key below Esc without Shift, you will produce a backtick (`) or a grave accent. While they look similar, they are entirely different characters in the eyes of a computer. A backtick is often used in Markdown for code blocks, whereas a tilde is used for approximations or directory paths.
Another common mistake occurs when users confuse the tilde with the wavy dash used in some specialized typography. The tilde is a specific ASCII character. Attempting to create it by holding down the hyphen key or the underscore key will not work, as those are straight lines.
Users on international keyboards often struggle because the tilde is not in the same place as it is on a US QWERTY layout. Trying to press the top-left key on a European keyboard might result in a different symbol or no character at all if the system language settings do not match the physical hardware layout.
Tips
If you find yourself needing to type the tilde frequently for programming or data entry, consider learning the Alt code (Alt + 126). This is a reliable fallback that works regardless of where the symbol is physically printed on your keyboard, provided you have a dedicated number pad.
For those using macOS, you can create a tilde over a letter (like ñ) by pressing Option + N and then pressing the letter N again. This is different from typing a standalone squiggly line, as it creates a single combined character rather than two separate symbols.
When using the tilde to mean "approximately," it is standard practice to place it immediately before the number without a space (e.g., ~10 miles). This makes the meaning clear to the reader and follows common mathematical and informal writing conventions.
If you are working in a professional document and the tilde looks too small or misplaced, check your font. Some serif fonts render the tilde very high up, while sans-serif fonts like Arial or Calibri usually center it better relative to the numbers.
Troubleshooting
If you press the Shift + Tilde key and nothing happens, first check if your keyboard is functioning correctly by typing other characters. If other keys work, ensure that your operating system's keyboard language is set to the correct region. For example, if your computer is set to French but you are using a US keyboard, the keys will not map correctly. Go to your system settings (Settings > Time & Language > Language & Region on Windows, or System Settings > Keyboard > Input Sources on Mac) and verify the layout.
If the wrong symbol appears (like a double quote or a different accent), you are likely using a keyboard layout where the tilde has been moved. Try exploring the keys around the Enter key or the number row while holding Shift. You can also use the On-Screen Keyboard (available in Windows Accessibility settings) to visually identify which key triggers the tilde in your current software configuration.
In some rare cases, software "hotkeys" or macros may override the tilde key. If you have installed gaming software or productivity tools that remap keys, check those settings to ensure the tilde key hasn't been assigned to a different function, such as opening a console in a video game or triggering a shortcut in a design app.
If the Alt code (Alt + 126) does not work, ensure that Num Lock is turned on. Alt codes require the numeric keypad on the right side of the keyboard; they generally do not work using the number row above the letters.
Frequently Asked Questions
What is the formal name for the squiggly line?
The formal name for the symbol (~) is the tilde. It originates from Latin and is used in various languages and technical fields.
How do I type a tilde on a Chromebook?
On a Chromebook, the process is the same as on Windows: hold the Shift key and press the key located in the top-left corner, just below the Esc key.
Why does my tilde look like a straight line?
This is usually a result of the font you are using. Some highly stylized or condensed fonts may flatten the curve of the tilde, making it look more like a hyphen or a dash.
Can I use a tilde instead of the word "approximately"?
Yes, in informal writing, emails, and mathematical notes, the tilde is a widely accepted shorthand for "approximately" or "around." However, avoid using it in formal academic papers or legal documents.
Does the tilde have a meaning in file paths?
Yes, in Unix, Linux, and macOS terminal environments, the tilde represents the current user's home directory. Typing "cd ~" will take you directly back to your home folder.
What is the difference between a tilde and a backtick?
The tilde (~) is the squiggly line produced with Shift, while the backtick (`) is the slanted straight line produced without Shift on the same key. They are distinct characters with different uses in coding.