FTJ
← Blog
Developer

HTML Entities — Complete Reference and Usage Guide

Learn what HTML entities are, when to use them, and how to encode/decode special characters with our free online tool.

HTML entities are special codes used to represent characters that have reserved meanings in HTML or characters that cannot be typed on a standard keyboard.

What Are HTML Entities?

HTML entities start with an ampersand (&) and end with a semicolon (;). They represent characters that would otherwise be interpreted as HTML markup:

CharacterEntityDescription
<&lt;Less than
>&gt;Greater than
&&amp;Ampersand
"&quot;Double quote
'&apos;Single quote
&nbsp;Non-breaking space
©&copy;Copyright
®&reg;Registered trademark
&euro;Euro sign
£&pound;Pound sign

When to Use HTML Entities

1. Reserved Characters

<!-- Wrong -->

<!-- Right --> <p>5 &lt; 10 and 10 &gt; 5</p> `

2. Special Symbols

<p>Price: &euro;50 or &pound;40</p>
<p>Copyright &copy; 2025</p>

3. Invisible Characters

<p>100&nbsp;km/h</p>

Numeric Entities

You can also use numeric codes:

CharacterDecimalHexadecimal
A&#65;&#x41;
©&#169;&#xA9;
&#8364;&#x20AC;

Common Mistakes

  1. Forgetting the semicolon&lt instead of &lt;
  2. Double encoding&amp;lt; instead of &lt;
  3. Encoding in attributestitle="5 &lt; 10" is correct
  4. Not encoding in code blocks — Inside <pre> and <code>, entities are still interpreted

Try It Online

Use our free HTML entities encoder/decoder to encode or decode HTML entities instantly — no installation needed.

Try These Tools

More Articles