UtilVox
code_blocks

HTML Entity Encoder

Encode and decode HTML entities instantly with surgical precision for web applications.

inputInput
outputResult
Result will appear here...

Encoding Format

Strategy

list_altNamed Entities Matrix

search
CharNamedHexAction
&&&
<&lt;&#x3C;
>&gt;&#x3E;
"&quot;&#x22;
'&apos;&#x27;
©&copy;&#xA9;
®&reg;&#xAE;
&trade;&#x2122;
&euro;&#x20AC;
£&pound;&#xA3;
¥&yen;&#xA5;
°&deg;&#xB0;
±&plusmn;&#xB1;
×&times;&#xD7;
÷&divide;&#xF7;
¼&frac14;&#xBC;
½&frac12;&#xBD;
¾&frac34;&#xBE;
α&alpha;&#x3B1;
β&beta;&#x3B2;
&infin;&#x221E;
&ne;&#x2260;
&approx;&#x2248;
§&sect;&#xA7;
Advertisement
728x90

HTML Entity Knowledge

The Characters That Break HTML

The five you must encode, and friends

HTML gives some characters jobs. Use them as plain text without encoding, and the parser takes them as instructions:

CharacterEntityWhat happens unencoded
<&lt;Starts a tag — following text can vanish
>&gt;Closes a tag prematurely
&&amp;Starts an entity — &copy in text becomes ©
double quote&quot;Ends an attribute value early
single quote&#39;Same, in single-quoted attributes
©, ™, —, ₨&copy; &trade; &mdash; etc.Usually fine as UTF-8, entities are the safe fallback

When encoding is mandatory

Two situations demand it. Displaying code on a web page: a tutorial showing HTML examples must encode every angle bracket, or the browser renders your example instead of showing it. User-supplied content: anything visitors type — comments, names, search terms — must be entity-encoded before display, because unencoded user input is how script-injection (XSS) attacks happen. Frameworks usually handle the second case; hand-written templates must do it deliberately.

Decode when content arrives pre-mangled

Scraped text, CMS exports and RSS feeds often arrive with &amp; and &quot; baked in — decoding here restores readable text. While cleaning markup, the HTML formatter untangles the structure itself, HTML to Markdown converts content into an editable format, and URL percent-encoding — a different scheme entirely — lives in the URL encoder.