Skip to content
M2TOOLKIT

HTML Entity Encoder & Decoder

Escape characters that have special meaning in HTML, or turn entities back into text.

  • Free
  • No sign-up
  • Runs in your browser
Mode

Everything you type is processed in your browser. Nothing you enter is sent to our servers or stored by us.

How to use the HTML Entity Encoder

  1. Choose Encode or Decode.
  2. Paste your text.
  3. 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 &lt;a href=&quot;?a=1&amp;b=2&quot;&gt;

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.

Other tools people use alongside the html entity encoder.