HTML Entity Encode & Decode

Escape HTML special characters or decode entities back to text.

Result appears here.

Encode text so it displays literally inside HTML (turning < into &lt; and so on), or decode a string full of entities back into readable text. Handles named and numeric entities, entirely in your browser.

How to use the HTML Entity Encoder / Decoder

  1. Paste your text or entity-encoded HTML.
  2. Click Encode to escape special characters, or Decode to convert entities back.
  3. Copy the result.

Frequently asked questions

Which characters need escaping in HTML?

The five with special meaning: & (&amp;), < (&lt;), > (&gt;), double quote (&quot;) and single quote (&#39;). Escaping them prevents text from being parsed as markup β€” the basis of XSS prevention.

Does decoding handle numeric entities like &#8364;?

Yes β€” both named entities (&euro;) and numeric forms (decimal &#8364; or hex &#x20AC;) decode correctly.