HTML Encoder/Decoder

Convert special characters to HTML entities and back

Encode HTML

Convert special characters to HTML entities for safe display

HTML Entities Reference

&&
<&lt;
>&gt;
"&quot;
'&apos;
¡&iexcl;
¢&cent;
£&pound;
¤&curren;
¥&yen;
¦&brvbar;
§&sect;
¨&uml;
©&copy;
ª&ordf;
«&laquo;
¬&not;
®&reg;
¯&macr;
°&deg;
±&plusmn;
²&sup2;
³&sup3;
´&acute;
µ&micro;
&para;
·&middot;
¸&cedil;
¹&sup1;
º&ordm;
»&raquo;
¼&frac14;

Examples

Click an example to load it

HTML Tags
<div class="container">Hello & welcome!</div>...
<div class="container">Hello & welcome!</div>
JavaScript
const name = "John"; // Comment with "quotes"...
const name = "John"; // Comment with "quotes"
XSS Prevention
<script>alert("XSS")</script>...
<script>alert("XSS")</script>
Special Chars
Copyright © 2024 | Price: €50 | "Quoted" & 'single...
Copyright © 2024 | Price: €50 | "Quoted" & 'single'
URL Attributes
<a href="page.html?a=1&b=2">Click & go</a>...
<a href="page.html?a=1&b=2">Click & go</a>