HTML Escape / Unescape

⚡ Convert Text

Convert HTML special characters to entity codes or decode entity codes back to characters. Supports & < > " ' and numeric entities. All processing is local.

Result will appear here...

📊 Result Chart

📖 How to Use

1. Enter content: Type or paste the HTML text you want to escape or unescape.

2. Select mode: Choose "Escape" to convert special characters (< > & etc.) to HTML entities, or "Unescape" to convert entities back to characters.

3. Copy result: Click "Copy Result" to copy the converted text to your clipboard.

❓ FAQ

What characters are escaped?

The following characters are converted to HTML entities: & → &amp;, < → &lt;, > → &gt;, " → &quot;, ' → &#39;. These are the five characters that have special meaning in HTML and must be escaped to display them as literal text.

What is HTML escaping used for?

HTML escaping prevents XSS (Cross-Site Scripting) attacks by ensuring user input is treated as text rather than executable HTML. It is also used when you need to display HTML tags as visible text on a web page, or when embedding code snippets.

Does unescape support numeric entities?

Yes. The unescape mode supports both named entities (&amp;, &lt;, &gt;, &quot;, &#39;, &nbsp;) and numeric entities (&#60;, &#x3C;, etc.). All are decoded back to their original characters.

Is this tool secure?

Completely secure. All operations run locally in your browser using JavaScript. Your data is never uploaded to any server.