TOOLTIKI Lovable tool, really free
Developer Encoding

HTML encoder

What to do
Indent

Processed in your browser · nothing is uploaded

Local · escaping is not sanitising
Advertisement
320 × 100

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

1 Paste your input. The result appears immediately.
2 Pick the operation you want.
3 Copy the result, or save it as a file.

Order matters and is the classic bug: the ampersand has to be escaped first, or escaping `<` to `&lt;` and then escaping ampersands produces `&amp;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.

WHATWG — named character references
Advertisement
300 × 250
Was this tool any good?
INTERNAL SIGNAL ONLY · WE USE IT TO FIND TOOLS WORTH REBUILDING