{}devfolio/tools

HTML Entities

New

Escape and unescape HTML special characters and entities.

Plain text
0 lines · 0 chars · 0 bytes
Encoded
0 lines · 0 chars · 0 bytes

How to use the HTML Entities

  1. 1Choose Encode to escape HTML, or Decode to turn entities back into characters.
  2. 2Paste your text or markup.
  3. 3Turn on Escape non-ASCII to also convert characters like é or emoji into numeric entities.

Questions

Which characters are escaped?

The five that matter in HTML: & < > " and '. That's enough to show text safely inside elements and attributes.

Which entities can it decode?

All numeric entities (&#233; and &#xe9;) and common named ones such as &amp;, &nbsp;, &copy; and &mdash;.

Does escaping prevent XSS?

It's the core of it for text in HTML, but use your framework's built-in escaping rather than doing it by hand.

You might also need