How to use the HTML Entity Encoder
- Choose Encode or Decode.
- Paste your text.
- Copy the result.
What does this tool do?
Characters like < and & must be escaped to appear as text in HTML; otherwise browsers treat them as markup. Escaping user input is also a basic defence against cross-site scripting (XSS).
Why use it?
- Show code samples on web pages.
- Decode entities in scraped or exported text.
- Encode non-ASCII characters for old systems.
Example
<a href="?a=1&b=2"> encodes to <a href="?a=1&b=2">
Privacy
Everything you type is processed in your browser. Nothing you enter is sent to our servers or stored by us. There's no account to create and nothing to install.
Last reviewed by the M2Toolkit team.