HTML entity encoder and decoder
Runs in your browser – nothing is uploaded.
Escape text so it can be shown safely inside HTML, or turn HTML entities back into the characters they represent.
Encoding escapes markup characters such as <, >, & and quotes, plus any non-ASCII characters, as numeric entities. Decoding understands both named entities (like &) and numeric ones.
Example
Mode: Encode
Input
<p class="note">Fish & Chips – £5</p>Output
<p class="note">Fish & Chips – £5</p>Frequently asked questions
Why are the entities numeric instead of names like <?
Numeric entities work for every character and are understood by all browsers. Both forms are decoded.
Does encoding make user input safe against XSS?
Escaping helps when text is placed between HTML tags, but safe output depends on where the text goes (attributes, scripts, URLs). Use your framework’s escaping for production code.