HTML Entity Encoder / Decoder

Pick a direction and paste — the conversion runs as you type, in this page.

How it works

Encode escapes the five characters that are meaningful in HTML — & < > " ' — to &amp; &lt; &gt; &quot; &#39;, so the text is safe to drop into an HTML document. Decode reverses those five named entities, and also understands numeric entities such as &#65; (decimal) and &#x41; (hex) — both decode to A. A malformed entity with no trailing semicolon, like &amp, is left alone as ordinary text.