CalcHive

HTML Entity Encode & Decode

Encode or decode HTML entities. Convert special characters to HTML entities and vice versa. Supports named and numeric entities.

Examples

HTML tags

In:<div class="main">Hello & welcome</div>
Out:&lt;div class=&quot;main&quot;&gt;Hello &amp; welcome&lt;...

Script tag (XSS prevention)

In:<script>alert('xss')</script>
Out:&lt;script&gt;alert(&#39;xss&#39;)&lt;/script&gt;

Math expression

In:5 < 10 & 10 > 5
Out:5 &lt; 10 &amp; 10 &gt; 5

How to Use HTML Entity Encode & Decode

  1. Select Encode or Decode mode.
  2. Paste your HTML text in the input area.
  3. The result appears instantly.
  4. Click "Copy" to copy the result.

Frequently Asked Questions

Related Tools