HTML Entities
NewEscape and unescape HTML special characters and entities.
- Runs in your browser
- Encoding
How to use the HTML Entities
- 1Choose Encode to escape HTML, or Decode to turn entities back into characters.
- 2Paste your text or markup.
- 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 (é and é) and common named ones such as &, , © and —.
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.