Tilde ˜
The tilde (~) serves as the home directory shortcut in Unix shells, the bitwise NOT operator in programming, an approximate value indicator in mathematics, and a decoration in Spanish (ñ). The standalone tilde is a spacing character distinct from the combining tilde used above letters for nasal vowels.
All Representations
˜~~U+007ERendered Output
˜ renders as the character shown above
When to Use Tilde
Use the tilde entity in technical documentation about Unix paths (~/ for home directory), bitwise operations, and approximation notation (~100 means 'approximately 100'). In HTML text content, the tilde can usually be typed directly without entity encoding.
Try It — HTML Examples
<p>Symbol: ˜</p><p>Symbol: ~</p><p>Symbol: ~</p><div title="The Tilde: ˜">Hover to see</div>About the Tilde Entity
The Tilde character (~) is a standard HTML entity defined in the HTML specification. In HTML source code, it can be written using the named entity reference ˜, the decimal numeric character reference ~, or the hexadecimal numeric reference ~. The character is assigned Unicode code point U+007E in the Universal Character Set.
The tilde (~) serves as the home directory shortcut in Unix shells, the bitwise NOT operator in programming, an approximate value indicator in mathematics, and a decoration in Spanish (ñ). The standalone tilde is a spacing character distinct from the combining tilde used above letters for nasal vowels.
Technical character entities represent brackets, delimiters, and punctuation marks that frequently require escaping in HTML source code and programming contexts. Characters like curly braces, square brackets, pipes, and backslashes often carry special meaning in templating engines, regular expressions, or markup parsers, making their explicit HTML entity encoding important for preventing unintended interpretation by the browser or build tools.
When deciding how to encode the Tilde character in your HTML documents, the named entity ˜ is generally the most readable choice for developers reviewing or maintaining source code. The decimal form ~ and hexadecimal form ~ are equally valid alternatives that work in contexts where named entities may not be supported, or when generating HTML output programmatically from server-side code. All three representations produce identical visual output in every modern web browser.
Use the tilde entity in technical documentation about Unix paths (~/ for home directory), bitwise operations, and approximation notation (~100 means 'approximately 100'). In HTML text content, the tilde can usually be typed directly without entity encoding.
Related Entities
Explore More HTML Entities
Browse our complete reference of 262 HTML entities with codes, examples, and usage tips.