HTML Entity Encoder Decoder

Encode special HTML characters or decode HTML character references into text.

Your input is processed in this browser and is not uploaded.

HTML Entity Encoder Decoder

Make special characters visible as text in an HTML text context, or inspect existing character references. Results remain in a text field rather than becoming a rendered page.

How to use it

  1. Choose Encode or Decode.
  2. Paste text or HTML character references.
  3. Select Run tool and inspect the text before copying it.

Worked example

Encoding <b>A & B</b> gives &lt;b&gt;A &amp; B&lt;/b&gt;. Decoding restores the literal markup string; the tool does not display it as bold content.

Limits and troubleshooting

Encoding handles ampersands, angle brackets and both quote characters. This is not a general sanitizer for HTML documents, URLs, JavaScript or CSS. Repeated encoding changes existing entities because their ampersands are escaped again. Limit: 200,000 input characters.

Frequently asked questions

Why did &amp; become &amp;amp;?

The existing entity's ampersand was encoded again: the literal text &amp; becomes &amp;amp;. Encode once at the boundary that needs it.

Can this remove scripts from an HTML document?

No. Use a destination-appropriate sanitizer instead of treating character encoding as a document security filter.