Tilde Symbol (~): Meaning, Uses and How to Type It

KEYBOARD SYMBOLS
THE KEYBOARD SYMBOLS SERIES
ALL LEVELS · 18 MINUTE READ
Meaning, Uses and How to Type It
Learn what the tilde symbol is, what a tilde means in writing, mathematics, linguistics and programming, how it works as a mark over letters such as ñ and ã, where the tilde key is on keyboards from different countries, and how to type it on Windows, Mac and phones.

What is the tilde symbol? The tilde (~) is a wavy line that sits at the top left of a US keyboard. As a symbol on its own, it often means approximately (~5 km), it stands for the home folder in Unix-style systems (cd ~), and in logic and programming it can mean not. As a mark above a letter, it forms characters such as ñ in Spanish and ã in Portuguese. The same word covers both uses, and the tilde meaning depends on where you meet it.

This page explains the tilde from the start: its names and origin, its meaning in writing, mathematics, linguistics, and dictionaries, its uses in computing, how to find the tilde key and how to type the tilde on keyboard layouts of different countries, how to type letters such as ñ, and the rules of style for using it in prose. It ends with 30 exercises and a 10-question quiz.

Infographic. Tilde (~): meaning, history, and typing. From a scribes’ mark to ñ. It shows: Names ; tilde · squiggle · twiddle (informal) ; Meanings ; approximately · similar to · not · home directory ; Over letters ; ñ (Spanish) · ã and õ (Portuguese) ; Origin ; a mark written over a letter by medieval scribes ; Typing ; US keyboard Shift + the key left of 1 ; Windows Alt + 126 ; ASCII character 126 · Unicode U+007E.
The tilde began as a scribes’ mark over letters; it means approximately or similar to and appears in ñ, ã, and õ. Tap or click to see it full size.
✦ In plain words

The tilde is the wavy line ~. By itself it usually means about or similar to. On top of a letter, as in ñ, it changes the sound or the spelling of the letter.

Why it matters: On a US keyboard you type it by holding Shift and pressing the key to the left of the number 1.

★ In brief

Summary: The tilde (~) is ASCII character 126 (Unicode U+007E). It began as a small mark written over a letter by medieval scribes as an abbreviation, which is the source of the Spanish ñ and the Portuguese ã. As a stand-alone symbol it means approximately in informal writing, similar to or alternates with in mathematics and linguistics, and not in some logic notations and programming languages; in Unix-style systems, it stands for the home directory. On a US keyboard, type it with Shift + the key left of 1.

  • Names: tilde, squiggle, twiddle (informal); from Latin titulus.
  • Meanings: approximately, similar to, not, home directory.
  • Over letters: ñ (Spanish), ã and õ (Portuguese).
  • US keyboard: Shift + the key left of 1; Windows Alt code: Alt + 126.

About 18 minutes to read. Rules and examples last reviewed October 29, 2026.

KeyboardBeginners can start with the Basic chapter on Using Punctuation Correctly; the Intermediate chapter Punctuation Marks covers the other marks. This page is part of the keyboard symbols series.

1. What Is the Tilde Symbol? Names and Appearance

💡 Memory Trick: The tilde is a wave: a small wave over a letter, or a wave in the middle of a line meaning about.
Property Tilde symbol
symbol ~
common names tilde; informally, squiggle, twiddle, wavy line
origin of the word Spanish tilde, from Latin titulus (a title or a superscript mark)
Unicode name and code TILDE, U+007E
ASCII code 126 (hexadecimal 7E)
HTML entity for the keyboard tilde ~ (note that ˜ in HTML shows a different, small tilde)
key on a US keyboard the key to the left of 1, typed with Shift
read aloud as tilde; squiggle
Related character Code Use
tilde (~) U+007E the keyboard character
small tilde (˜) U+02DC a spacing accent mark
combining tilde (◌̃) U+0303 placed over a letter, as in ñ
tilde operator (∼) U+223C similarity in mathematics
almost equal to (≈) U+2248 approximate equality
wave dash (〜) and fullwidth tilde (~) U+301C and U+FF5E used in East Asian typing for ranges
negation sign (¬) U+00AC not, in logic
swung dash (⁓) U+2053 a typographic mark that stands for a repeated word

The same word tilde names two things that look alike: a character that stands alone on the keyboard (the symbol ~) and a mark that sits above a letter (the diacritic). In Unicode they are separate characters with separate code points. The keyboard tilde is what this page is mostly about; the mark above letters is described in the section on letters.

2. History: From Scribes’ Mark to Keyboard Key

The tilde began as a scribe’s shortcut. In medieval manuscripts, writers saved space and effort by writing a small mark above a letter to show that a letter was omitted. A small n or a wavy line over a vowel could stand for a missing nasal letter. In Spanish, the letter ñ grew out of a doubled nn in which the second n was written as a small mark above the first. In Portuguese, the mark over a vowel (ã, õ) shows nasalization after the loss of a nasal consonant. When computers were developed, the tilde was included in the ASCII character set as a stand-alone character at code 126, and programmers gave it many jobs.

Period Development
medieval manuscripts a small mark above a letter abbreviates a missing letter
Old Spanish and Portuguese the mark settles into ñ, ã, and õ
early twentieth century the tilde appears in logic (for example in Principia Mathematica, 1910) as a symbol of negation (~p) and in mathematics as similarity
ASCII and Unix era the tilde is a keyboard character; it becomes the shorthand of the home directory in Unix shells
1990s and 2000s ~ in web addresses for personal pages; Windows short file names; temporary files
today approximately in informal writing; strikethrough in Markdown (~~text~~); wave dash in East Asian text

Sources agree on the broad story; the details of how particular spellings developed in each language are matters for historical linguists.

3. Tilde Meaning in Writing, Mathematics, and Linguistics

Use Example Notes
approximately The trip took ~5 hours. informal; in formal prose write about or approximately
similar to or equivalent to A ∼ B (with the tilde operator) mathematics
negation ~p (not p) older logic notation; ¬ is the modern form
proportional to y ∼ x statistics
distributed as X ∼ N(0, 1) statistics: X follows a normal distribution
alternates with /ɪ/ ~ /i/ linguistics: two forms that vary freely
allomorphs a ~ an linguistics: two forms of one unit
replaces the headword in a dictionary example run: ~ away many dictionaries
range in East Asian typing 5~10 the wave dash; in English use an en dash (5–10)
emphasis or tone in chat See you soon~ informal, playful
a mark over a letter ñ, ã, õ see the section on letters
Language Letter with a tilde Example What it does
Spanish ñ año (year), niño (child) a separate letter of the alphabet; the sound /ɲ/
Portuguese ã, õ mãe (mother), põe (puts) nasalization of the vowel
Estonian õ õu (yard) a separate letter for a vowel
Basque and Galician ñ mañana as in Spanish
Vietnamese ã, ẽ, ĩ, õ, ũ, ỹ and others mã (tomb), nữ (female) a tone mark
Tagalog and Filipino ñ in Spanish-derived names Niño, Muñoz from Spanish

In English, the tilde over a letter is not part of the spelling, but it is kept in words and names borrowed from Spanish and Portuguese (piñata, jalapeño, São Paulo), and many style guides keep it. In running English text, the stand-alone tilde is informal. For general rules on marks and on borrowed letters, see the chapters on advanced punctuation and on typography and grammar; for numbers and approximations, see the chapter on numbers in writing.

4. Uses of the Tilde in Computing and Programming

Context Use Example
Unix, Linux, and macOS shells stands for the current user’s home directory cd ~; ~/Documents
another user’s home ~name ~sam
web addresses a personal page of a user on a server example.edu/~sam/
bitwise NOT C, C++, Java, JavaScript, Python ~x
regular expression match Perl and Ruby $s =~ /cat/
R formulas separates the response from the predictors y ~ x
MATLAB logical NOT ~isempty(x)
Windows short file names a shortened name with a number PROGRA~1
Microsoft Office temporary files a file starting with ~$ ~$report.docx
Emacs and other editors backup files end with a tilde notes.txt~
Markdown (GitHub style) two tildes make strikethrough ~~old~~
wiki signatures four tildes insert a signature ~~~~
CSS and other languages the general sibling selector h2 ~ p

The tilde appears in many more contexts, and the meaning varies by program. The safest habit is to read the documentation of the language or program that you are using. The grammar of technology terms is treated in the chapter on grammar and technology.

5. How to Type the Tilde: Finding the Tilde Key on a Keyboard

Device or system How to type ~ (the tilde)
Windows or Mac, US keyboard hold Shift and press the key to the left of 1 (the ` ~ key)
UK keyboard hold Shift and press the key to the left of Enter (marked # ~)
Windows Alt code hold Alt and type 126 on the numeric keypad (with Num Lock on)
German keyboard hold AltGr and press the + key
French AZERTY keyboard hold AltGr and press 2
Spanish keyboard hold AltGr and press 4
iPhone and iPad tap 123, then #+=, then ~
Android tap ?123, then the second symbols page, then ~
Indian English keyboards follow the US or UK layout
web pages (HTML) write ~
Letter Windows (Alt code) Mac Other methods
ñ Alt + 0241 (or Alt + 164) Option + N, then n on iPhone, hold n and slide to ñ; HTML ñ
Ñ Alt + 0209 (or Alt + 165) Option + N, then Shift + n HTML Ñ
ã Alt + 0227 Option + N, then a HTML ã
õ Alt + 0245 Option + N, then o HTML õ
If you cannot find the key What to try
Shift + the key gives another character check the input language and layout
the key acts as a dead key (it waits for a letter) on some layouts, the tilde appears only after you press the space bar; this is how ñ is formed
the key is missing on a small keyboard use the Alt code, an on-screen keyboard, or copy and paste
you want to copy it select this character: ~

6. Style Rules: Using the Tilde in Writing

Question Guidance
Is ~5 acceptable for about 5? in informal writing, notes, and technical text; in formal prose, write about or approximately
Space after the tilde? no space in ~5; a space is acceptable in a few contexts, but follow your guide
Tilde or ≈? use ≈ for almost equal in mathematics; ~ for about in notes
Tilde for a range? not in English; use an en dash (5–10) or the word to
Keep the tilde in borrowed words? yes, in names and Spanish and Portuguese words: jalapeño, São Paulo
Tilde in emphasis or tone? informal; avoid in formal writing
Tilde in a username or path? follow the system; do not “fix” it
Alphabetical order of ñ? in Spanish, ñ is a separate letter after n

A good test is to read the sentence aloud: if you would say about, the tilde is a shorthand. If the sentence is for a general reader, say it in words.

7. Common Mistakes with the Tilde

Mistake Example Better
using ~ for a range in English *pages 10~20 pages 10–20
using ~ in formal prose *The study lasted ~3 years. The study lasted about three years.
dropping the tilde from a borrowed word *jalapeno, *Sao Paulo jalapeño, São Paulo (if your guide keeps accents)
replacing ñ with n *manana mañana
confusing the tilde with a hyphen or dash *5~10 5–10
using a tilde for negation in modern logic where ¬ is expected *~p ¬p
typing the small tilde (˜) instead of ~ — use the keyboard key
✎ Worked example

Fix: The ~20 students from Sao Paulo, ages 10~12, will arrive at ~9. (a school notice).

  1. ~20 students: a tilde in a notice for general readers: about 20 students.
  2. Sao Paulo: the accent is dropped: São Paulo.
  3. ages 10~12: a tilde for a range: ages 10 to 12 (or 10–12).
  4. at ~9: at about 9 a.m.
  5. Result: About 20 students from São Paulo, ages 10 to 12, will arrive at about 9 a.m. (the notice is invented)
▶

Recap in 12 seconds

Watch the lesson build itself: The tilde began as a scribes’ mark over letters; it means approximately or similar to and appears in ñ, ã, and õ. The video has no sound.

Exercises

Part A: Names and Appearance (Exercises 1–6)

Exercise 1: Name two other names for the tilde.

Show Answer

Answer: Squiggle, twiddle, wavy line.

Exercise 2: From which Latin word does tilde come?

Show Answer

Answer: titulus (title, superscript).

Exercise 3: What is the Unicode code of the keyboard tilde?

Show Answer

Answer: U+007E.

Exercise 4: What is the ASCII code of the tilde?

Show Answer

Answer: 126.

Exercise 5: Which HTML entity shows the keyboard tilde?

Show Answer

Answer: ~.

Exercise 6: Is ˜ the same character as ~?

Show Answer

Answer: No; it is the small tilde (˜).

Part B: Writing and Letters (Exercises 7–14)

Exercise 7: What does ~5 km mean?

Show Answer

Answer: About five kilometers.

Exercise 8: What is a better word in formal prose?

Show Answer

Answer: About or approximately.

Exercise 9: Which letter did Spanish form from a doubled nn?

Show Answer

Answer: ñ.

Exercise 10: What does the tilde do in Portuguese ã?

Show Answer

Answer: Shows nasalization of the vowel.

Exercise 11: Give two English words that keep the tilde.

Show Answer

Answer: Jalapeño, piñata, São Paulo (a name).

Exercise 12: How do you write a range in English?

Show Answer

Answer: With an en dash (5–10) or the word to.

Exercise 13: What does X ∼ N(0, 1) mean?

Show Answer

Answer: X is distributed as a standard normal variable.

Exercise 14: What does a ~ an show in linguistics?

Show Answer

Answer: That the two are forms of one unit that alternate.

Part C: Computing (Exercises 15–20)

Exercise 15: What does cd ~ do?

Show Answer

Answer: Goes to the current user’s home directory.

Exercise 16: What does ~x do in C?

Show Answer

Answer: Bitwise NOT of x.

Exercise 17: What does ~~old~~ show in GitHub Markdown?

Show Answer

Answer: Strikethrough text.

Exercise 18: What does a file name starting with ~$ usually mean?

Show Answer

Answer: A temporary Office file.

Exercise 19: What does y ~ x mean in R?

Show Answer

Answer: A formula: y modeled by x.

Exercise 20: What are four tildes in a wiki?

Show Answer

Answer: An automatic signature.

Part D: Typing (Exercises 21–26)

Exercise 21: Where is the tilde key on a US keyboard?

Show Answer

Answer: To the left of 1; hold Shift.

Exercise 22: What is the Windows Alt code for ~?

Show Answer

Answer: Alt + 126.

Exercise 23: Where is it on a UK keyboard?

Show Answer

Answer: Shift + the key to the left of Enter (# ~).

Exercise 24: How do you type ñ on a Mac?

Show Answer

Answer: Option + N, then n.

Exercise 25: What is the Alt code for ñ?

Show Answer

Answer: Alt + 0241 (or Alt + 164).

Exercise 26: Why might the tilde not appear immediately?

Show Answer

Answer: On some layouts it is a dead key and waits for the next character.

Part E: Style and Correction (Exercises 27–30)

Exercise 27: Correct: *pages 10~20

Show Answer

Answer: pages 10–20.

Exercise 28: Correct (formal): *about ~3 years

Show Answer

Answer: about three years.

Exercise 29: Correct: *manana (Spanish word).

Show Answer

Answer: mañana.

Exercise 30: Correct: *Sao Paulo

Show Answer

Answer: São Paulo.

Test Your Knowledge

Ready to check what you learned? Answer all 10 questions, then submit. You need 80% (8 of 10) to pass. Your answers are not stored.

Question 1:

What does ~ usually mean before a number in informal writing?




Question 2:

What is the ASCII code of the tilde?




Question 3:

Which letter has a tilde in Spanish?




Question 4:

How do you type ~ on a US keyboard?




Question 5:

What does cd ~ do?




Question 6:

Which is better in a formal range?




Question 7:

What does the tilde show in Portuguese ã?




Question 8:

Which Alt code types ~ on Windows?




Question 9:

What does ~~text~~ make in GitHub Markdown?




Question 10:

What is the origin of the word tilde?




Frequently Asked Questions

What is the tilde symbol?

The tilde symbol (~) is a wavy line character on the keyboard, ASCII 126. It means approximately in informal writing, similar to in mathematics, not in some logic and code, and the home directory in Unix-style systems. The tilde also appears over letters such as ñ.

What is the tilde meaning in math and writing?

The tilde meaning depends on the context: about in notes (~5), is distributed as in statistics (X ∼ N), not in older logic (~p), and alternates with in linguistics.

Where is the tilde key on a keyboard?

The tilde key on a US keyboard is the key to the left of the number 1, typed with Shift. On a UK keyboard, it is Shift + the key to the left of Enter.

How do I type the tilde on keyboard layouts that lack it?

Use the Alt code (Alt + 126 on Windows), AltGr combinations on some European keyboards (AltGr + 2 on French AZERTY), the symbols page on a phone, or copy and paste. To type the tilde on keyboard layouts that need a dead key, press the space bar after it.

What is the tilde character in Unicode?

The tilde character is U+007E TILDE. Other related characters include the small tilde (U+02DC), the combining tilde (U+0303), and the tilde operator (U+223C).

What does a tilde mean over a letter?

It is a diacritic that changes the letter: ñ in Spanish is a separate letter, and ã and õ in Portuguese show nasalization.

Can I use the tilde in formal writing?

For approximation, write about or approximately. Keep the tilde over letters in borrowed words and names, such as jalapeño and São Paulo.

Conclusion

You now know what the tilde is, where it came from, what it means in writing, mathematics, linguistics, and code, how to find the tilde key and type letters such as ñ, and how to avoid the common mistakes with it.

Use the tilde as a shorthand in notes and keep the accents in names; in formal prose, write the words. Next in the series is the ampersand.

▣ Sources and further reading
  • The Unicode Consortium. The Unicode Standard. Basic Latin, Spacing Modifier Letters, and Combining Diacritical Marks blocks.: the character names and code points.
  • Real Academia Española and Asociación de Academias de la Lengua Española. Ortografía de la lengua española. 2010.: the letter ñ in Spanish.
  • Bringhurst, Robert. The Elements of Typographic Style. 4th ed. Hartley and Marks, 2012.: the typography of diacritics and symbols.
  • Shotts, William. The Linux Command Line. 2nd ed. No Starch Press, 2019.: the tilde in the shell.
  • Merriam-Webster Dictionary: tilde: the dictionary entry.
ⓘ About this page

Last reviewed: October 29, 2026. How it was made: drafted with AI assistance, then checked with automated tests (structure, links, answer keys, spelling) and against the sources above. A person has not yet read this chapter line by line. Found a mistake? Report it.