HTML Entity Encoder / Decoder

Encode special characters to HTML entities or decode HTML entities back to plain text. Supports numeric and named entities.

Tools run in your browser. Shared links may include your input; check the URL before sharing.

How to use

  1. Paste text or HTML containing entities.
  2. Choose encode or decode and inspect special characters.

This example illustrates one supported operation. Choose the matching mode and settings above; generated values and formatting may vary.

Example input or settings

<div class="hello">Hello & World</div>

Example result

&lt;div class=&quot;hello&quot;&gt;Hello &amp; World&lt;/div&gt;

Does entity encoding replace sanitization?

No. Sanitize untrusted HTML with a dedicated sanitizer before rendering it.