How to use
Escape replaces &, <, >, double quotes and single quotes with HTML entities. Unescape restores named or numeric entities. The result is always displayed as plain text.
Example
<p>Hello & world</p> → <p>Hello & world</p>
Convert special HTML characters and entities for displaying code as text.
Escape replaces &, <, >, double quotes and single quotes with HTML entities. Unescape restores named or numeric entities. The result is always displayed as plain text.
<p>Hello & world</p> → <p>Hello & world</p>
HTML text escaping is not a universal sanitizer for every context. Entities are decoded one layer at a time; input tags and scripts are never inserted into the live page.
Why does &lt; become < instead of <? It was escaped twice. Decoding one layer at a time avoids changing entities that are meant to remain visible.