HTML Entities Escape / Unescape

Free online HTML escape and unescape tool — convert <, >, &, " and more to HTML entities and back, with a live preview.

  1. Choose Escape to convert HTML characters to entities, or Unescape to convert them back.
  2. Paste your input text.
  3. The live preview shows how a browser would render the unescaped output.
  4. Copy the result.

FAQ

What are HTML entities?

HTML entities are special sequences used to represent reserved characters in HTML. For example, < must be written as &lt; so the browser doesn't interpret it as a tag start.

When do I need to escape HTML?

Always escape user-generated content before inserting it into HTML to prevent XSS (Cross-Site Scripting) attacks. Also escape when embedding code examples in web pages.

What characters are escaped?

The five essential characters: & → &amp;, < → &lt;, > → &gt;, " → &quot;, and ' → &#039;. These cover all XSS-relevant cases.