◨ DEVELOPER Updated July 25, 2026
HTML Entity Encoder / Decoder
Escape or unescape HTML entities safely.
Text
Result
Ad space · belowTool · horizontal
How it works
Encoding replaces the characters that break markup — &, <, >, quotes — with their named entities, optionally extending to every non-ASCII character. Decoding uses the browser's own parser, so it understands the full named-entity table.
Frequently asked questions
When do I need to escape HTML?
Any time user-supplied text is inserted into markup. Escaping is the simplest defence against cross-site scripting.
What is the difference between &#39; and &apos;?
Both represent an apostrophe. The numeric form ' is safer because ' is not defined in older HTML versions.
Comments