About This Tool

What does this tool do?

An HTML entity encoding and decoding utility. Converts special characters (`&`, `<`, `>`, `"`, `'`) into named entities (`&amp;`, `&lt;`, `&gt;`, `&quot;`, `&#39;`), decimal numeric entities (`&#38;`), or hexadecimal entities (`&#x26;`) to prevent Cross-Site Scripting (XSS), and decodes entity strings back to raw HTML.

When should you use it?

Use this tool when displaying user-generated input safely inside HTML templates, encoding code snippets for documentation tutorials, or decoding escaped HTML responses from legacy APIs.

Key Capabilities & Features

Escape special HTML characters into secure HTML entities (&amp;, &lt;, &gt;, &quot;, &#39;)
Unescape named, decimal, and hexadecimal HTML entities back into readable text
XSS injection prevention by sanitizing user input for HTML rendering
Selective escaping mode for attribute-only, content-only, or full-document strings
Instant copy and clean output formatting with character count statistics