HTML Entity Encoder

Formula: & → &amp; < → &lt; > → &gt; " → &quot;

HTML Entity Encoder

HTML entity encoding converts special characters to their entity equivalents for safe display in web pages.

Conversion Formula

& → &amp; < → &lt; > → &gt; " → &quot;

Each special character is replaced with its named or numeric entity reference.

Step-by-Step Examples

<p>Hello & "World"</p> = &lt;p&gt;Hello &amp; &quot;World&quot;&lt;/p&gt;

All special characters encoded

Frequently Asked Questions

What are HTML entities?

HTML entities are special codes that represent characters that have special meaning in HTML, like < and >.

Why encode HTML entities?

To prevent XSS attacks and display special characters as text instead of being interpreted as HTML code.