💳 343,063 BIN records🏦 13,269 Issuing banks🌍 199 Countries🧰 30 Free tools

HTML Entity Encoder / Decoder

Escape text for safe use in HTML, convert special characters to numeric entities, or decode entities back to plain text.

Common HTML entities

CharacterEntityNumericDescription
&&&Ampersand
<&lt;&#60;Less-than sign
>&gt;&#62;Greater-than sign
"&quot;&#34;Double quotation mark
'&apos;&#39;Apostrophe (single quote)
⍽&nbsp;&#160;Non-breaking space
©&copy;&#169;Copyright sign
®&reg;&#174;Registered trademark
™&trade;&#8482;Trademark sign
€&euro;&#8364;Euro sign
£&pound;&#163;Pound sign
¥&yen;&#165;Yen sign
¢&cent;&#162;Cent sign
§&sect;&#167;Section sign
°&deg;&#176;Degree sign
±&plusmn;&#177;Plus-minus sign
×&times;&#215;Multiplication sign
÷&divide;&#247;Division sign
…&hellip;&#8230;Horizontal ellipsis
–&ndash;&#8211;En dash
—&mdash;&#8212;Em dash
«&laquo;&#171;Left angle quotation mark
»&raquo;&#187;Right angle quotation mark
·&middot;&#183;Middle dot

About the HTML Entity Encoder / Decoder

HTML uses a few characters for its own syntax, so the ampersand, the less-than and greater-than signs and quotes must be written as entities such as &amp;, &lt; and &quot; when they appear as text. Escaping them is also the first defence against cross-site scripting (XSS) when you show user input on a page. Choose “special characters” to escape only those five characters, or “all non-ASCII” to also turn accented letters, symbols and emoji into numeric entities like &#233; — useful for old systems, e-mail templates and files with an unknown encoding. Decode mode does the opposite: it turns named, decimal and hexadecimal entities back into readable characters, exactly as a browser would. The reference table lists the entities you will need most often. Everything runs in your browser.

FAQ

What is the difference between &#39; and &apos;?

Both mean an apostrophe. &apos; is defined in HTML5 and XML but not in old HTML 4, so the numeric form &#39; is the safest choice and works everywhere.

Is escaping HTML enough to prevent XSS?

Escaping the five special characters protects text placed between tags and inside quoted attributes. URLs, JavaScript and CSS contexts need their own encoding, so also use a templating engine that escapes by default and a Content Security Policy.

Should I use named or numeric entities?

Numeric entities work for every Unicode character and in every parser. Named entities are easier to read but exist only for some characters. With UTF-8 pages you normally only need to escape the special characters.