Skip to main content

HTML Entity Encoder & Decoder

Safely escape `<`, `>`, `&`, and quotes for HTML templates and code blocks, or unescape `&amp;` / `&#x...;` entities back into plain text locally.

Processed locally · 0 bytes uploaded

Input HTML / Text

Result

Essential HTML Entities Reference

CharacterNamed EntityHex EntityWhy Escape It
&&amp;&#x26;Prevents bare ampersands from starting unintended entities
<&lt;&#x3C;Stops user text or code examples from opening HTML/script tags
>&gt;&#x3E;Closes angle-bracket pairs cleanly inside <pre><code>
"&quot;&#x22;Prevents breaking double-quoted HTML attribute values
'&#39;&#x27;Protects single-quoted HTML attributes

Specs

Supported formats
Input & Output: Raw HTML/text ↔ Named (&amp;, &lt;) or numeric (&#x...;) HTML entities
File & batch limits
Text snippets and templates up to several MB convert immediately in browser RAM
AI model download
None (0 MB — zero external dependencies)
Browsers & devices
All modern desktop & mobile browsers
Offline support
Yes — works 100% offline once loaded

FAQ

When should I check 'Encode non-ASCII as &#x...;'?

Enable it when embedding emoji, smart quotes, or CJK text into legacy email templates or ASCII-only XML/HTML feeds.

Is decoding untrusted HTML entities safe here?

Yes. Decoded output is written exclusively to a plain-text <textarea> value and never injected as executable DOM.

Share this tool: