Free HTML escape & unescape tool — entities, XSS-safe output, display code

Escaping runs entirely in your browser — nothing is uploaded.

HTML Escape & Unescape — entity-encode for safe, XSS-free output

When untrusted text is inserted into an HTML page, the markup characters must be converted to entities so the browser shows them literally instead of running them as tags or scripts. This is the front line against cross-site scripting (XSS), and it's also how you display code samples on a page. This tool escapes and unescapes in your browser — nothing is uploaded.

What gets escaped

CharacterEntity
&&
<&lt;
>&gt;
"&quot;
'&#39; (HTML-safe form)

⚠️ Context matters

Entity escaping secures text placed in element content and quoted attributes. Values going into a URL, an inline <script>, or a CSS context need their own encoding — escaping the five characters is necessary but not sufficient in those positions.

Related tools