Skip to main content

HTML Entity Converter

Encode and decode HTML entities to prevent XSS attacks and display special characters safely.

🔒 HTML Encode

Output will appear here...

💡 Common HTML Entities

CharacterNamedDecimalHex
<&lt;&#60;&#x3C;
>&gt;&#62;&#x3E;
&&amp;&#38;&#x26;
"&quot;&#34;&#x22;
'&apos;&#39;&#x27;
©&copy;&#169;&#xA9;
€&euro;&#8364;&#x20AC;
🔒 Prevent XSS

Encode user input to prevent cross-site scripting attacks

📝 Display HTML

Show HTML code as text without executing it

🔄 Data Transfer

Safely transmit special characters in URLs and forms

🌐 Internationalization

Handle unicode characters across different systems

Key Features​

  • Bidirectional conversion (Encode ↔ Decode)
  • Multiple encoding formats: Named, Decimal, Hexadecimal
  • Real-time conversion
  • Example templates

Encoding Formats​

Named Entities​

&lt; &gt; &amp; &quot;

Decimal Entities​

&#60; &#62; &#38; &#34;

Hexadecimal Entities​

&#x3C; &#x3E; &#x26; &#x22;

Use Cases​

1. Prevent XSS Attacks​

// Encode user input
const safeHtml = encodeHtml(userInput);

2. Display HTML Code​

Show HTML as text without executing it

3. Data Transfer​

Safely transmit special characters in URLs and forms

Common Entities​

Character  Named      Decimal    Hex
< &lt; &#60; &#x3C;
> &gt; &#62; &#x3E;
& &amp; &#38; &#x26;
" &quot; &#34; &#x22;
© &copy; &#169; &#xA9;