HTML Entity Encoder / Decoder

Convert text into named, decimal, or hexadecimal HTML entities and decode encoded HTML back to plain text.

Format:

Common Reserved Characters Cheat Sheet

CharacterNameNamed EntityDecimalHex
&Ampersand&&&
<Less than&lt;&#60;&#x3c;
>Greater than&gt;&#62;&#x3e;
"Double quote&quot;&#34;&#x22;
'Single quote&#39;&#39;&#x27;
©Copyright&copy;&#169;&#xa9;
®Registered&reg;&#174;&#xae;
Non-breaking space&nbsp;&#160;&#xa0;

About HTML Entities

An HTML entity is a piece of text ("string") that begins with an ampersand (&) and ends with a semicolon (;). Entities are frequently used to display reserved characters (which would otherwise be parsed as HTML markup) or invisible characters (like non-breaking spaces).

Security & XSS Prevention

Encoding user-supplied input into HTML entities prevents Cross-Site Scripting (XSS) attacks by guaranteeing that browsers treat tags like <script> strictly as text rather than executable markup.

Entity Types

  • Named Entities: Easy to read human mnemonics like &copy; or &euro;.
  • Decimal Entities: Based on the Unicode code point, e.g. &#169;.
  • Hex Entities: Hexadecimal Unicode representations like &#xa9;.

Rate this tool

Log in to share your feedback on this tool.