Skip to content
Utilerio

HTML Encoder / Decoder

Encode special characters as HTML entities and decode them back.

Output

The result will appear here.

Was this tool useful?

About this tool

HTML uses angle brackets, ampersands and quotes as structural characters. When you need to display them as literal text inside an HTML document, they must be escaped to their entity equivalents: < becomes &lt;, > becomes &gt;, & becomes &amp;.

Encoding is also important for security: storing user-supplied text without encoding it is how XSS (cross-site scripting) vulnerabilities are introduced.

How to use it

  1. Switch to Encode mode and paste plain text. Click Encode to convert special characters to entities.
  2. Switch to Decode mode and paste HTML with entities. Click Decode to convert them back to plain text.

Examples

Encoding special characters

<script>alert("XSS")</script>
&lt;script&gt;alert(&quot;XSS&quot;)&lt;/script&gt;

Frequently asked questions