HTML Entity for Tilde (∼)

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

What You'll Learn

How to display the Tilde operator symbol (∼) in HTML using hexadecimal, decimal, named entity, and CSS escape methods. This character is U+223C (TILDE OPERATOR) in the Mathematical Operators block (U+2200–U+22FF)—used for similarity, equivalence, or approximation in math notation.

Render it with ∼, ∼, the named entity ∼, or CSS escape \223C. This is not the ASCII tilde character ~ (U+007E). Do not confuse ∼ with ~ or the combining mark ̰ (Tilde Below).

⚡ Quick Reference — Tilde Entity

Unicode U+223C

Mathematical Operators

Hex Code ∼

Hexadecimal reference

HTML Code ∼

Decimal reference

Named Entity ∼

Most readable option

Reference Table
Name           Value
────────────   ──────────
Unicode        U+223C
Hex code       ∼
HTML code      ∼
Named entity   ∼
CSS code       \223C
Block          Mathematical Operators (U+2200–U+22FF)
Official name  TILDE OPERATOR
Related        U+007E = Tilde (~), U+0330; = Tilde Below (̰)
1

Complete HTML Example

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

html
<!DOCTYPE html>
<html>
<head>
 <style>
  #point:after{
   content: "\223C";
  }
 </style>
</head>
<body>
<p>Using Hexadecimal: &#x223C;</p>
<p>Using HTML Code: &#8764;</p>
<p>Using Named Entity: &sim;</p>
<p id="point">Using CSS Entity: </p>
</body>
</html>
Try it Yourself

🌐 Browser Support

The Tilde operator entity is universally supported in modern browsers:

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

👀 Live Preview

See the Tilde operator symbol (∼) in mathematical context:

Similarity AB
Large glyph
Not ASCII Math: ∼  |  Keyboard: ~
Numeric refs &#x223C; &#8764; &sim; \223C

🧠 How It Works

1

Hexadecimal Code

&#x223C; uses the Unicode hexadecimal value 223C to display the Tilde operator symbol. The x prefix indicates hexadecimal format.

HTML markup
2

Decimal HTML Code

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

HTML markup
3

CSS Entity

\223C is used in CSS stylesheets, particularly in the content property of pseudo-elements like ::before and ::after.

CSS stylesheet
4

Named Entity

&sim; is the semantic named entity — short for “similar” and the easiest to read in source HTML.

HTML markup
=

Same visual result

All four methods produce the glyph: . Unicode U+223C in the Mathematical Operators block. Distinct from ASCII ~ (U+007E).

Use Cases

The Tilde operator symbol (∼) commonly appears in:

📐 Mathematical Notation

Equations and formulas for similarity or approximation.

⇆ Similarity Relations

Showing two objects or sets are similar or equivalent.

🔬 Set Theory

Equivalence classes and theoretical mathematics.

📄 Scientific Docs

Research papers and academic publications.

📝 Mathematical Proofs

Theorem statements and formal demonstrations.

🎓 Education

Mathematics textbooks and instructional content.

💻 Technical Specs

Algorithm descriptions and formal specifications.

💡 Best Practices

Do

  • Prefer &sim; for readable source markup
  • Use ∼ for mathematical similarity, not keyboard ~
  • Pick one style (hex / decimal / named) per project
  • Add aria-label for standalone symbols in UI
  • Test the glyph across browsers and math-friendly fonts

Don’t

  • Confuse ∼ (Tilde Operator) with ~ (ASCII U+007E)
  • Mix entity styles randomly in one file
  • Put CSS escape \223C directly in HTML text nodes
  • Use HTML entities in JS (use \u223C instead)
  • Assume all fonts render ∼ clearly at small sizes

Key Takeaways

1

Three HTML references all render ∼

&#x223C; &#8764; &sim;
2

For CSS stylesheets, use the escape in the content property

\223C
3

Unicode U+223C — TILDE OPERATOR

4

Prefer &sim; — the named entity for similarity notation

5

Not the same as keyboard tilde ~ (U+007E)

❓ Frequently Asked Questions

Use &#x223C; (hex), &#8764; (decimal), &sim; (named), or \223C in CSS content. All produce ∼.
U+223C (TILDE OPERATOR). Mathematical Operators block (U+2200–U+22FF). Hex 223C, decimal 8764. Distinct from ASCII tilde ~ (U+007E).
In mathematical notation, similarity relations, set theory, equivalence relations, scientific documentation, academic papers, mathematical proofs, and any formal content representing similarity or approximation.
The named entity &sim; is more readable in source code. Numeric references (&#8764; or &#x223C;) are more explicit. CSS escape \223C is for stylesheets only. All produce ∼.
&sim; is the named HTML entity for ∼. The name sim stands for similarity and is part of the HTML5 standard. Prefer it over numeric codes when readability matters.

Explore More HTML Entities!

Discover 1500+ HTML character references — math operators, logic 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