# Tilde

The tilde (~) is a wavy character encoded in Unicode as U+007E, used primarily as a diacritic over letters such as Spanish ñ and Portuguese ã and õ, and in its freestanding form to indicate approximation, logical negation, or similarity in mathematics<sup>[1](https://www.merriam-webster.com/dictionary/tilde)</sup>.

| Key fact | Detail |
|---|---|
| Code point | U+007E TILDE, decimal 126; a single byte (7E) in ASCII, UTF-8, and Latin-1<sup>[2](https://unicodedecoder.com/characters/tilde)</sup> |
| Primary use | Diacritic over a base letter: Spanish ñ indicates an "ny" sound; Portuguese vowels ã, õ indicate nasality<sup>[1](https://www.merriam-webster.com/dictionary/tilde)</sup> |
| Word history | First attested in English circa 1864, from Spanish, from a vernacular form of Medieval Latin titulus<sup>[3](https://www.etymonline.com/word/tilde)</sup> |
| Related encodings | U+0303 COMBINING TILDE (the diacritic itself), U+02DC SMALL TILDE (spacing modifier letter), U+2053 SWUNG DASH (dictionary and alternation use), U+223C TILDE OPERATOR (mathematics)<sup>[4](https://www.unicode.org/versions/Unicode17.0.0/core-spec/chapter-7/)</sup><sup> • </sup><sup>[5](https://www.unicode.org/versions/latest/ch06.pdf)</sup>  |
| Rendering | Modern fonts generally render U+007E with a center-line glyph; a raised spacing form is common in older implementations such as terminal emulation and typewriter-style fonts<sup>[5](https://www.unicode.org/versions/latest/ch06.pdf)</sup> |
| Typing in TeX | In plain TeX the key produces a protected space; the character is typed with \textasciitilde and the math symbol with \sim<sup>[6](https://tex.stackexchange.com/questions/320855/why-is-tilde-not-available-out-of-the-box-in-tex)</sup> |

## Etymology and scribal history

The English word tilde is attested from circa 1864, borrowed from Spanish, where it named the diacritic placed over the letter n to indicate an "ny" sound, as in señor. Spanish in turn took it by metathesis from Catalan title, a vernacular form of [Medieval Latin](https://www.edgepedia.org/medieval-latin) titulus, "a stroke over an abridged word to indicate missing letters"<sup>[3](https://www.etymonline.com/word/tilde)</sup>. The mark itself represents a small n: in Medieval Latin manuscripts it was written over a preceding letter of an abbreviated word to show an omitted n, saving the scribe's labor and the cost of vellum and ink<sup>[3](https://www.etymonline.com/word/tilde)</sup>. The same mark appears at times in early modern English printing as a contraction for m or n, though that usage was not called a tilde before modern times<sup>[3](https://www.etymonline.com/word/tilde)</sup>.

In modern Spanish the word tilde most commonly refers to the accent mark, while ñ is treated as its own letter of the alphabet; English speakers use tilde specifically for the wavy mark<sup>[1](https://www.merriam-webster.com/dictionary/tilde)</sup>.

## From typewriter key to ASCII

As a freestanding printed character, the tilde did not exist in conventional type or hot-lead printing. On mechanical typewriters, Spanish keyboards carried a dead key holding the acute accent (´) and the diaeresis (¨); creating a similar dead key for Portuguese keyboards, which also needed the tilde over vowels, produced the ~ key. The tilde therefore entered the character set purely as a combining accent<sup>[6](https://tex.stackexchange.com/questions/320855/why-is-tilde-not-available-out-of-the-box-in-tex)</sup>. Computer keyboards inherited the typewriter layout, and the key carried the tilde into ASCII at position 126<sup>[6](https://tex.stackexchange.com/questions/320855/why-is-tilde-not-available-out-of-the-box-in-tex)</sup><sup> • </sup><sup>[2](https://unicodedecoder.com/characters/tilde)</sup>.

## Unicode treatment

Unicode follows [ISO/IEC 8859-1](https://www.edgepedia.org/iso-iec-8859-1) in placing U+007E among the Basic Latin characters, and treats it as a spacing character only; the combining form lives separately in the Combining Diacritical Marks block as U+0303<sup>[4](https://www.unicode.org/versions/Unicode17.0.0/core-spec/chapter-7/)</sup>. The standard notes that U+007E is ambiguous between a spacing form of the diacritic and an operator or punctuation mark, and recommends unambiguous alternatives: U+02DC SMALL TILDE for the spacing diacritic and U+223C TILDE OPERATOR for mathematics<sup>[4](https://www.unicode.org/versions/Unicode17.0.0/core-spec/chapter-7/)</sup><sup> • </sup><sup>[5](https://www.unicode.org/versions/latest/ch06.pdf)</sup>.

The standard also distinguishes separate meanings by separate code points. Uses that include indicating alternation, an approximate value, or, in some notational systems, logical negation are all common for U+007E; in the negation context it acts as a shape-based substitute for the more precise U+00AC NOT SIGN. The dictionary convention of using a tilde to repeat the defined term is better encoded with the wider U+2053 SWUNG DASH<sup>[5](https://www.unicode.org/versions/latest/ch06.pdf)</sup>.

## Uses

**Language.** The tilde is the diacritic of Spanish ñ, representing the sound /ɲ/, a distinct phoneme from n, and of Portuguese ã and õ, indicating nasal vowels<sup>[1](https://www.merriam-webster.com/dictionary/tilde)</sup>. A 17th-century form of the Portuguese tilde also shaped a diacritic used in contemporary Middle Vietnamese orthography<sup>[7](https://unicode.org/versions/Unicode18.0.0/core-spec/chapter-7/)</sup>.

**Mathematics and logic.** A freestanding tilde marks an approximate value, negation in logic, and the geometric relation "is similar to" in mathematics<sup>[1](https://www.merriam-webster.com/dictionary/tilde)</sup>.

**Dictionaries.** A swung dash (⁓), a similar but wider mark, indicates the omission of the entry word in examples; this is the use Unicode assigns to U+2053<sup>[5](https://www.unicode.org/versions/latest/ch06.pdf)</sup>.

**Computing.** In C it serves as a bitwise NOT operator, and in languages such as Apache Groovy it appears in pattern-matching operators including =~ and ==~<sup>[8](https://unanswered.io/guide/tilde-symbol-meaning-usage)</sup>. In URLs and file paths the character also has established special uses<sup>[6](https://tex.stackexchange.com/questions/320855/why-is-tilde-not-available-out-of-the-box-in-tex)</sup>.

## Typesetting in TeX

Because the freestanding tilde had no place in conventional typography, [Donald Knuth](https://www.edgepedia.org/donald-knuth) assigned the keyboard key in TeX to something more useful: ~ produces a protected, non-breaking space<sup>[6](https://tex.stackexchange.com/questions/320855/why-is-tilde-not-available-out-of-the-box-in-tex)</sup>. In mathematics, \sim produces the tilde operator. In ordinary text mode the character is harder to typeset because fonts handle it differently; modern OpenType and TrueType fonts contain the glyph, reachable with \char`~, but \textasciitilde is preferred because it also works under other font encodings, and \texttildelow provides a workaround for fonts that need one<sup>[6](https://tex.stackexchange.com/questions/320855/why-is-tilde-not-available-out-of-the-box-in-tex)</sup>.

## References

1. [TILDE Definition & Meaning, Merriam-Webster](https://www.merriam-webster.com/dictionary/tilde)
2. [TILDE, Unicode Character Encoding Reference](https://unicodedecoder.com/characters/tilde)
3. [Tilde, Etymology, Origin & Meaning, Etymonline](https://www.etymonline.com/word/tilde)
4. [Chapter 7, The Unicode Standard, Version 17.0.0](https://www.unicode.org/versions/Unicode17.0.0/core-spec/chapter-7/)
5. [Chapter 6, The Unicode Standard (latest)](https://www.unicode.org/versions/latest/ch06.pdf)
6. [Why is tilde not available out of the box in TeX?, TeX Stack Exchange](https://tex.stackexchange.com/questions/320855/why-is-tilde-not-available-out-of-the-box-in-tex)
7. [Chapter 7, The Unicode Standard, Version 18.0.0](https://unicode.org/versions/Unicode18.0.0/core-spec/chapter-7/)
8. [Tilde (~) Symbol: Meaning in Text, C, Math & Flirting](https://unanswered.io/guide/tilde-symbol-meaning-usage)

---
*Topic: Encyclopedia › Society and history › Languages and linguistics › Writing and notation systems › Punctuation and orthographic marks*

*Initially written Sep 17, 2026 · Reviewed: Oct 25, 2026 · Edited: Oct 15, 2026; Oct 25, 2026 · Last review: Oct 25, 2026*

*Copyright 2026 EdgeChat AI, a subsidiary of Biostate AI.*

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license
