MT
MUSETOOLSDeveloper Utilities

HTML Encoder / Decoder

Encode or decode HTML entities with various options

Result

About HTML Encoding

HTML encoding converts special characters into their corresponding HTML entities to ensure they are displayed correctly in web browsers. This is necessary because certain characters have special meaning in HTML, such as < and > which define tags.

HTML Entity Types

  • Named Entities - Human-readable names for common characters (e.g., &lt; for <)
  • Decimal Entities - Numeric representation using decimal values (e.g., &#60; for <)
  • Hexadecimal Entities - Numeric representation using hex values (e.g., &#x3C; for <)

When to Use HTML Encoding

  • When displaying user-generated content on a webpage
  • When you need to display HTML code as text rather than having it rendered
  • When embedding special characters in HTML documents
  • When working with internationalized content that contains non-ASCII characters
  • When preventing XSS (Cross-Site Scripting) attacks by sanitizing user input

Common HTML Entities

CharacterNamed EntityDecimal EntityHex EntityDescription
<&lt;&#60;&#x3C;Less than sign
>&gt;&#62;&#x3E;Greater than sign
&&amp;&#38;&#x26;Ampersand
"&quot;&#34;&#x22;Double quote
'&apos;&#39;&#x27;Single quote (apostrophe)
©&copy;&#169;&#xA9;Copyright symbol
®&reg;&#174;&#xAE;Registered trademark
&euro;&#8364;&#x20AC;Euro sign