PrimeUtil

HTML Entity Encoder / Decoder

Encode special characters like <, >, &, and " into their HTML entity equivalents, or decode entity strings back to plain text. Essential for safely rendering user input, writing template strings, and debugging HTML payloads.

Plain text โ†’ HTML entities

Result will appear here.

Common HTML Entities

CharacterEntity NameNumericDescription
&&amp;&#38;Ampersand
<&lt;&#60;Less than
>&gt;&#62;Greater than
"&quot;&#34;Double quote
'&apos;&#39;Single quote
&nbsp;&#160;Non-breaking space
ยฉ&copy;&#169;Copyright
ยฎ&reg;&#174;Registered trademark
โ„ข&trade;&#8482;Trademark
โ‚ฌ&euro;&#8364;Euro sign
ยฃ&pound;&#163;Pound sign
โ€”&mdash;&#8212;Em dash

Features

  • Encodes all special HTML characters (&, <, >, ", ')
  • Decodes numeric (&#60;), hex (&#x3C;), and named (&lt;) entities
  • Real-time preview as you type
  • Handles both basic and extended HTML entities
  • Useful for XSS prevention and email template debugging

Frequently Asked Questions