HTML Entity for Tilde Bold (~)

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 1 Code Example
Unicode U+007E

What You'll Learn

How to display the standard Tilde symbol (~) in HTML using hexadecimal, decimal, named entity, and CSS escape methods. This character is U+007E (TILDE) in the Basic Latin block—the ASCII tilde on your keyboard, used in file paths, URLs, and technical notation.

Render it with ~, ~, the named entity ˜, or CSS escape \007E. You can also type ~ directly. Do not confuse ~ with ∼ (Tilde Operator, U+223C) or ∽ (Tilde Inverse). For a bold appearance, use CSS font-weight—there is no separate “bold tilde” Unicode character.

⚡ Quick Reference — Tilde Entity

Unicode U+007E

Basic Latin (ASCII)

Hex Code ~

Hexadecimal reference

HTML Code ~

Decimal reference

Named Entity ˜

Most readable option

Reference Table
Name           Value
────────────   ──────────
Unicode        U+007E
Hex code       ~
HTML code      ~
Named entity   ˜
CSS code       \007E
Block          Basic Latin (ASCII)
Official name  TILDE
Related        U+223C; = Tilde Operator (∼), U+223D; = Tilde Inverse (∽)
1

Complete HTML Example

This example demonstrates the Tilde symbol (~) using hexadecimal code, decimal HTML code, named entity, and a CSS content escape:

html
<!DOCTYPE html>
<html>
<head>
 <style>
  #point:after{
   content: "\007E";
  }
 </style>
</head>
<body>
<p>Using Hexadecimal: &#x7E;</p>
<p>Using HTML Code: &#126;</p>
<p>Using Named Entity: &tilde;</p>
<p id="point">Using CSS Entity: </p>
</body>
</html>
Try it Yourself

🌐 Browser Support

The Tilde entity is universally supported—U+007E is standard ASCII:

Chrome 1+
Firefox 1+
Safari 1+
Edge 12+
Opera 4+
Android 4.4+
iOS Safari 1+

👀 Live Preview

See the Tilde symbol (~) in common contexts:

File path ~/Documents
Large glyph ~
Bold style ~
Numeric refs &#x7E; &#126; &tilde; \007E

🧠 How It Works

1

Hexadecimal Code

&#x7E; uses the Unicode hexadecimal value 7E to display the Tilde symbol.

HTML markup
2

Decimal HTML Code

&#126; uses the decimal Unicode value 126 to display the same character.

HTML markup
3

CSS Entity

\007E is used in CSS stylesheets in the content property of pseudo-elements like ::before and ::after.

CSS stylesheet
4

Named Entity

&tilde; is the semantic named entity — the easiest to read in source HTML.

HTML markup
=

Same visual result

All four methods produce the glyph: ~. Unicode U+007E in Basic Latin (ASCII). You can also type it directly on most keyboards.

Use Cases

The Tilde symbol (~) commonly appears in:

📁 File Paths

Unix/Linux home directory shorthand (~/Documents).

🌐 URLs

Web addresses and path segments containing ~.

📐 Math Notation

Approximation and informal equivalence in text.

💻 Programming

Config files, CLI docs, and code examples.

📝 Tech Docs

System administration and developer guides.

🔬 Science

Approximate values in informal notation.

💬 Text Formatting

Delimiters and styled inline symbols.

💡 Best Practices

Do

  • Prefer &tilde; for readable source markup
  • Use entities when generating HTML programmatically
  • Use CSS font-weight: bold for a bold ~ appearance
  • Pick one style (hex / decimal / named) per project
  • Type ~ directly when encoding is UTF-8 and context is plain text

Don’t

  • Confuse ~ (U+007E) with ∼ (Tilde Operator) or ∽ (Tilde Inverse)
  • Expect a separate Unicode “bold tilde” character
  • Put CSS escape \007E directly in HTML text nodes
  • Use HTML entities in JS (use \u007E or "~" instead)
  • Mix entity styles randomly in one file

Key Takeaways

1

Three HTML references all render ~

&#x7E; &#126; &tilde;
2

For CSS stylesheets, use the escape in the content property

\007E
3

Unicode U+007E — TILDE (ASCII)

4

Prefer &tilde; for readability in HTML source

5

Bold appearance = CSS font-weight, not a different character

❓ Frequently Asked Questions

Use &#x7E; (hex), &#126; (decimal), &tilde; (named), or \007E in CSS content. You can also type ~ directly. All produce ~.
U+007E (TILDE). Basic Latin / ASCII block. Hex 7E, decimal 126. Standard keyboard character.
In file paths (home directory), URLs, technical documentation, programming contexts, and any content representing approximation, similarity, or the ASCII tilde character.
The named entity &tilde; is more readable in source code. Numeric references (&#126; or &#x7E;) are more explicit. CSS escape \007E is for stylesheets only. All produce ~.
&tilde; is the named HTML entity for ~ (U+007E). It is part of the HTML5 standard and is preferred when readability matters.

Explore More HTML Entities!

Discover 1500+ HTML character references — ASCII, math symbols, and more.

All HTML Entities →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful