Loading...

HTML Entity Encoder

Encode and decode HTML entities. Convert special characters to named or numeric entities.

Common HTML Entities Reference

Character Named Entity Numeric Entity Description
<&lt;&#60;Less than
>&gt;&#62;Greater than
&&amp;&#38;Ampersand
"&quot;&#34;Quotation mark
'&apos;&#39;Apostrophe
 &nbsp;&#160;Non-breaking space
  • Encode text to HTML entities
  • Decode HTML entities to plain text
  • Named entity encoding (&lt;, &gt;, etc.)
  • Numeric entity encoding (&#60;, &#62;, etc.)
  • Hexadecimal entity encoding (&#x3C;, &#x3E;, etc.)
  • Common entities reference table
  1. To Encode: Paste text with special characters, choose encoding type, click Encode
  2. To Decode: Paste HTML entities, click Decode
  3. Copy the result to use in your HTML

Use HTML entities to display special characters like <, >, & in HTML without the browser interpreting them as code. Essential for displaying code snippets or user-generated content safely.

Named entities (&lt;) are more readable but limited in scope. Numeric entities (&#60;) work for all Unicode characters. Use named for common characters, numeric for special symbols.

Yes! Encoding user input prevents XSS attacks. Always encode user-generated content before displaying it in HTML to prevent malicious script injection.