HTML Encoder / Decoder

Encode and decode HTML entities and special characters.

Common HTML Entities

  • &lt; = < (less than)
  • &gt; = > (greater than)
  • &amp; = & (ampersand)
  • &quot; = " (quote)
  • &apos; = ' (apostrophe)

❓ Frequently Asked Questions

HTML encoding converts special characters to HTML entities so they display as text instead of being interpreted as HTML. Use HTML encoding to: 1) Prevent XSS attacks, 2) Display code examples, 3) Show reserved characters (< > & "). Example: `` executes malicious code. Encoding converts it to `&lt;script&gt;` - safe text that can't execute. Always encode user input before displaying in HTML to prevent security vulnerabilities!
HTML encoding: For HTML content, uses &entity; format (&lt; for <). URL encoding: For URLs, uses %XX format (%20 for space). They serve different purposes: HTML prevents code injection; URL ensures valid URIs. Use HTML encoding for webpage content; URL encoding for links and query strings.
Yes! HTML decoding reverses encoding: &lt; → <, &amp; → &, etc. Paste HTML-encoded text and click Decode HTML. Useful for: 1) Reading encoded content, 2) Converting entities to unicode, 3) Processing scraped HTML. Note: Some entities have multiple representations (< = &#60; = &#x3C;).