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.

Answers, not just a number

Short, exact answers to the questions people ask alongside this tool — the number first, then the working.

For teams, not just visitors

Want this calculator on your own site?

We build the calculators on SnoopTool as embeddable widgets in your branding, wired to your own lead form — the same maths, your colours, your domain, your leads. Tell us which one and we will send back a working demo you can put in front of your team.

One reply from a person, within one business day. No newsletter, no sequence. See our privacy policy.