All Tools

HTML Encoder / Decoder

Encode special characters to HTML entities and decode them back

Input

Output

Common HTML Entities Reference

CharacterEntity NameEntity NumberDescription
<&lt;&#60;Less than
>&gt;&#62;Greater than
&&amp;&#38;Ampersand
"&quot;&#34;Double quote
'&apos;&#39;Single quote
 &nbsp;&#160;Non-breaking space
©&copy;&#169;Copyright
®&reg;&#174;Registered
&trade;&#8482;Trademark

How HTML Encoding Works

HTML encoding converts special characters into entity references that browsers display as the original characters without interpreting them as HTML markup.

Why Encode HTML?

Frequently Asked Questions

What are HTML entities?
HTML entities are special codes that represent characters with special meaning in HTML. For example, < is &lt; and & is &amp;.
Why do I need to encode HTML?
HTML encoding prevents XSS attacks and ensures special characters display correctly instead of being interpreted as HTML tags.
What entities does this tool handle?
This tool handles all standard HTML entities including &lt; &gt; &amp; &quot; &apos; &nbsp; &copy; &reg; &trade; and numeric references.