HTML Entity Encoder

Encode and decode HTML entities. Convert special characters to their HTML entity equivalents and vice versa.

Input

Output

Enter text to see conversion

What are HTML Entities?

HTML entities are special character sequences that begin with an ampersand (&) and end with a semicolon (;). They are used to display reserved characters in HTML that would otherwise be interpreted as HTML code, or to display characters that are not easily typed on a keyboard.

Common examples include:

  • &lt; for < (less than)
  • &gt; for > (greater than)
  • &amp; for & (ampersand)
  • &quot; for " (quotation mark)
  • &copy; for © (copyright)

Common Use Cases

  • Display HTML Code: Show HTML tags as text on a webpage
  • Prevent XSS Attacks: Sanitize user input to prevent cross-site scripting
  • Email Templates: Ensure special characters display correctly in emails
  • XML/RSS Feeds: Encode content for XML compatibility
  • Database Storage: Store HTML content safely
  • Special Characters: Display copyright symbols, currency signs, and other special characters