83 · Text Tools

HTML Entity Encoder & Decoder

Escape text so it shows literally on a web page, or turn &-style entities back into characters.

HTML Entity Encoder & Decoder

Mode

How to use the html entity encoder & decoder

  1. Choose encode or decode.
  2. Paste your text or HTML.
  3. Copy the result.

Why escape?

Characters like < and & have special meaning in HTML. Escaping them (to &lt; and &amp;) displays them as text and stops user input being treated as markup.

Examples

<p class="note">Fish & chips</p>

&lt;p class=&quot;note&quot;&gt;Fish &amp; chips&lt;/p&gt;

Decode: caf&#233; &copy; 2026

café © 2026

Questions

Which named entities does decoding support?

The common ones (&amp;amp;, &amp;nbsp;, &amp;copy;, &amp;mdash; and about 30 more) plus every numeric entity.

Is this enough to prevent XSS?

Escaping is one part. Use your framework’s built-in escaping in real applications.