Free online tools to generate, calculate, convert, format, transform, and de/en-code.
 

HTML Entity

Convert special characters to HTML entities and decode HTML entities back to plain text. Essential for web development and XSS prevention.


Mode

Encode to HTML Entities

Common HTML Entities Reference

Character Named Entity Numeric Description
<&lt;&#60;Less than
>&gt;&#62;Greater than
&&amp;&#38;Ampersand
"&quot;&#34;Double quote
'&apos;&#39;Single quote
 &nbsp;&#160;Non-breaking space
©&copy;&#169;Copyright
®&reg;&#174;Registered trademark
&trade;&#8482;Trademark
&euro;&#8364;Euro sign

About HTML Entities

HTML entities are used to display reserved characters in HTML and to display characters that are not present on the keyboard. They begin with an ampersand (&) and end with a semicolon (;).

Why Use HTML Entities?

  • Reserved Characters: Display <, >, & in HTML
  • XSS Prevention: Escape user input safely
  • Special Symbols: Display ©, ®, ™, etc.
  • Non-ASCII: Ensure compatibility across encodings

Entity Types

  • Named: &lt; (easier to read)
  • Numeric: &#60; (decimal code point)
  • Hex: &#x3C; (hexadecimal code point)
  • All Valid: Browser interprets all formats
Security Note: Always encode user-generated content before displaying in HTML to prevent XSS (Cross-Site Scripting) attacks. At minimum, encode < > & " and '.

Feedback

Help us improve this page by providing feedback:


Share with