🔤 HTML Entity Encoder

Encode special characters as HTML entities and decode entities back to plain text. Choose named, decimal, or hexadecimal entity format.

Named & Numeric Encode All Non-ASCII Instant Decode
Entity format:
Input
Output
Common HTML Entities
&&&Ampersand
&lt;&#60;<Less-than
&gt;&#62;>Greater-than
&quot;&#34;"Double quote
&apos;&#39;'Single quote / apostrophe
&nbsp;&#160; Non-breaking space
&copy;&#169;©Copyright ©
&reg;&#174;®Registered ®
&trade;&#8482;Trademark ™
&euro;&#8364;Euro €
&pound;&#163;£Pound £
&yen;&#165;¥Yen ¥
&mdash;&#8212;Em dash —
&ndash;&#8211;En dash –
&hellip;&#8230;Ellipsis …

FAQ

When should I encode HTML entities?

You should encode entities whenever you insert user-supplied text into HTML to prevent XSS (Cross-Site Scripting) attacks. At minimum, encode &, <, >, ", and '. In HTML attribute values, also encode the quote character wrapping the attribute.

What does "Encode ALL non-ASCII" do?

When checked, every character with a code point above 127 is also encoded — e.g., é becomes &#233;. This is useful when working with legacy systems that only support ASCII, or when embedding content in environments that may misinterpret high-byte characters.

Which entity format should I use?

Named entities are most readable (&amp;). Decimal numeric entities work universally (&#38;). Hex numeric entities (&#x26;) are common in XML and some APIs. All are semantically equivalent in HTML5.

Can I decode multiple different entity types at once?

Yes — the decoder handles named, decimal, and hexadecimal entities simultaneously. Paste any mix of entity formats and click Decode to get the plain text representation.