Free HTML Encoder / Decoder

Encode special HTML characters (< > & " ') into HTML entities, or decode HTML entities back to their original characters. All done instantly in your browser.

🔒 100% Private ⚡ Instant 🆓 Free
Advertisement

About HTML Encoder / Decoder

HTML encoding converts special characters that have syntactic meaning in HTML into their entity equivalents, preventing them from being interpreted as markup. For example, < becomes &lt; so it displays as a literal less-than sign rather than opening a tag.

HTML decoding does the reverse: it converts named entities like &amp;, &lt;, &gt;, &quot; and numeric entities like &#60; back to their corresponding characters.

Common HTML Entities Reference

Character Named Entity Numeric Entity Description
<&lt;&#60;Less than
>&gt;&#62;Greater than
&&amp;&#38;Ampersand
"&quot;&#34;Double quote
'&apos;&#39;Single quote

Frequently Asked Questions

When displaying user-generated content, source code, or HTML snippets inside an HTML page, special characters must be encoded to prevent browser misinterpretation and Cross-Site Scripting (XSS) vulnerabilities.

HTML encoding replaces characters with HTML entities (e.g. &lt;) for safe display in HTML documents. URL encoding uses percent-encoding (e.g. %3C) for safe transmission in URLs. They serve different contexts and are not interchangeable.

Yes — the encoder processes the entire input string. Note that encoding a full HTML page will turn all tags into entities, which is useful if you want to display HTML source code inside another HTML page.

Yes. The decoder uses the browser's native DOMParser to decode entities, which handles all named HTML5 entities (like &nbsp;, &copy;, &eacute;) as well as numeric decimal and hex entities.

Related Developer Tools