HTML Escape & Unescape – Free Online HTML Entities Encoder/Decoder

Escape special HTML characters (<, >, &, ", ') to their safe entity equivalents — or decode HTML entities back to plain text — instantly in your browser. Choose between named entities (&amp;), numeric (&#38;), or hex (&#x26;) formats. Options include escaping quotes for attribute values, encoding non-ASCII characters (accents, copyright, currency symbols), and a built-in reference table of 15 common HTML entities. Essential for web developers, content authors, and anyone preventing XSS vulnerabilities.

How to Use the HTML Escape & Unescape Tool

Why escape HTML?

HTML uses certain characters as part of its syntax. If those characters appear inside text content or attribute values without being escaped, the browser may misinterpret them — breaking layouts or creating XSS (Cross-Site Scripting) vulnerabilities. The five characters that must always be escaped are: &&amp;<&lt;>&gt;"&quot;'&#39;

Entity styles:

  • Named &amp;, &lt;, &copy;— most readable; preferred in HTML content.
  • Numeric &, <— works in all parsers regardless of charset.
  • Hex &, <— compact numeric form, common in generated/minified HTML.

Features:

  • Escape mode: Converts special HTML characters to safe entities.
  • Unescape mode: Decodes named, numeric, and hex entities back to characters.
  • Entity style: Choose named (&amp;), numeric (&), or hex (&).
  • Escape quotes: Optionally encode ' and " — useful for inserting text inside HTML attributes.
  • Encode non-ASCII: Also converts accented letters, symbols, and emoji to HTML entities for maximum compatibility.
  • Reference table: Quick lookup for 15 common HTML entities (collapsible).