Yuzool

Dev Tools

HTML entities encoder and decoder

Escape text so it shows as text inside HTML, or turn entities such as &, é and © back into the characters they stand for.

The five that matter

CharacterEntity
&&
<&lt;
>&gt;
"&quot;
'&#39;

Escaping these five is enough to put any text safely inside HTML. Tick Also encode every non-ASCII character if the page’s encoding isn’t UTF-8, or for email.

How to use it

  1. Pick Encode or Decode.
  2. Paste the text.
  3. Copy the result.

Questions

Does decoding know every named entity?

Yes: it uses your browser’s own HTML parser, which knows all 2,231 named entities, as well as numeric ones like &#x1F600;.

Is escaping enough to stop XSS?

For text inside HTML elements, yes. Inside attributes, URLs, scripts or CSS, different rules apply: use your framework’s escaping for each place.

Related tools

Open all 35 Dev Tools. Everything runs in your browser; nothing you paste is uploaded.

Settings

History

Snippet