HTML encoder
Processed in your browser · nothing is uploaded
Escapes the five characters that must be escaped in HTML — `&`, `<`, `>`, `"` and `'` — and decodes named, decimal and hexadecimal entities back again.
How to use the html encoder
Order matters and is the classic bug: the ampersand has to be escaped first, or escaping `<` to `<` and then escaping ampersands produces `&lt;` and the page shows the literal text. Escaping non-ASCII as numeric entities is a separate option and mostly historical — it was necessary when pages were served as Latin-1, and with UTF-8 it only makes the file larger. One thing worth stating plainly: escaping is not sanitising. Escaping makes text display safely; it does not make user-supplied HTML safe to insert, which needs an allowlist-based sanitiser.
Questions
Ampersand, less-than and greater-than always; double and single quotes inside attribute values.