HTML Entity Encoder
text ⇄ entitiesEscape text so it is safe inside HTML, or decode entities back.
Result appears hereAbout HTML Entity Encoder
Escape text so a browser renders it as text rather than parsing it as markup, or decode entities back into the characters they stand for. The five that matter are the ampersand, both angle brackets, and both kinds of quote; escaping them is what stops user-supplied text from becoming a tag.
Two levels are offered. The default escapes only what markup requires, plus the punctuation that has a familiar named entity — so accents and emoji pass through as themselves, which is correct for any modern UTF-8 page. The stricter mode escapes every non-ASCII character numerically as well, for the older systems and email templates that still cannot be trusted with anything above ASCII.
Decoding accepts named entities and numeric ones in both decimal and hex, and leaves anything it does not recognise alone — so a literal "&foo;" in your prose survives a round trip rather than quietly disappearing.
Common questions
This page does the work itself, in this tab. Nothing you paste is sent to a server. Close the tab and no copy remains.