HTML Entity Encoder / Decoder

Convert special characters to HTML entities or decode entities back to readable text. Supports both named (&) and numeric (&) entities.

 

About HTML Entities

HTML entities are used to display reserved characters in HTML that would otherwise be interpreted as code. For example, the less-than sign (<) starts an HTML tag, so to display it as text you must write &lt; instead. Entities can be written in named form (like &amp;) or numeric form (like &#38; or &#x26;).

Properly encoding HTML entities is essential for preventing XSS (cross-site scripting) vulnerabilities, ensuring your HTML renders correctly, and displaying code snippets on web pages.

Common HTML Entities Reference

CharacterDescriptionNamed EntityNumeric Entity
&Ampersand&amp;&#38;
<Less than&lt;&#60;
>Greater than&gt;&#62;
"Double quote&quot;&#34;
'Single quote / Apostrophe&apos;&#39;
 Non-breaking space&nbsp;&#160;
©Copyright&copy;&#169;
®Registered&reg;&#174;
Trademark&trade;&#8482;
Euro sign&euro;&#8364;
£Pound sign&pound;&#163;
¥Yen sign&yen;&#165;
¢Cent sign&cent;&#162;
Em dash&mdash;&#8212;
En dash&ndash;&#8211;
Bullet&bull;&#8226;
Horizontal ellipsis&hellip;&#8230;
«Left angle quote&laquo;&#171;
»Right angle quote&raquo;&#187;
Left single quote&lsquo;&#8216;
Right single quote&rsquo;&#8217;
Left double quote&ldquo;&#8220;
Right double quote&rdquo;&#8221;
×Multiplication sign&times;&#215;
÷Division sign&divide;&#247;
±Plus-minus sign&plusmn;&#177;
Not equal to&ne;&#8800;
Less than or equal&le;&#8804;
Greater than or equal&ge;&#8806;
°Degree sign&deg;&#176;

Frequently Asked Questions

What are HTML entities?
HTML entities are special codes used to display reserved characters in HTML. Since characters like <, >, and & have special meaning in HTML, you must use entities (like <, >, &) to display them as literal text on a web page.
When should I use HTML entities?
Use HTML entities when displaying reserved HTML characters (<, >, &, quotes) in page content, when including special symbols (©, ™, →), and when displaying characters not available on your keyboard. They ensure correct rendering across all browsers.
What's the difference between named and numeric entities?
Named entities use descriptive names (like & for &), while numeric entities use character codes (like &). Named entities are easier to read but not all characters have names. Numeric entities work for any Unicode character.
Keyboard Shortcuts
Ctrl+Enter Run / Format
Ctrl+Shift+C Copy output
Ctrl+L Clear