WebToolBox
' execute directly inside users' browsers, exposing session cookies and tokens."}}]}

HTML Escape

Try the free HTML Escape tool in the Encoding category provided by WebToolBox right in your browser. Process your tasks quickly and securely without any installation.

Input

Output

What is HTML Escaping?

HTML Escaping converts reserved HTML markup characters into their respective HTML character entities (such as '&lt;' for '<' and '&gt;' for '>').

It is the fundamental first line of defense against Cross-Site Scripting (XSS) attacks, preventing untrusted user input from being parsed and executed as active browser HTML or JavaScript code.

This tool escapes the five core security entities: &amp; (&), &lt; (<), &gt; (>), &quot; ("), and &#39; ('), with optional unescape toggle.

How to Use

  1. Paste or write the HTML or text string into the input area.
  2. The escaped HTML entity string is generated automatically in real time.
  3. Click 'Copy' to store the escaped code in your clipboard.
  4. Use 'Sample' to quickly load an example XSS test vector.

FAQ

Why is HTML escaping essential for web security?
Without escaping, attacker-controlled strings like '<script>alert(1)</script>' execute directly inside users' browsers, exposing session cookies and tokens.

EncodingTool Navigation