ToolsMaxxing

HTML encoder and decoder

Escape special characters as HTML entities, or turn entities back into text.

Your files stay on your device

How it works

  1. 1Choose Encode or Decode.
  2. 2Paste your text or HTML.
  3. 3Turn on the non-ASCII option if the target cannot handle UTF-8.
  4. 4Copy the result.

What the options do

Encode
Replaces & < > " and ' with &amp; &lt; &gt; &quot; and &#39; so the text shows literally in a page.
Decode
Converts named entities such as &copy; and numeric ones such as &#8377; back to characters.
Also encode non-ASCII characters
Writes every character above code 126 as a numeric entity, for example é as &#233;.

Privacy

This tool runs in your browser. Your files are never uploaded to a server.

Questions people ask

Which characters must be escaped in HTML?

The ampersand and the less-than sign always. Quotes need escaping inside attribute values. This tool escapes all five common ones so the result is safe in both places.

Does escaping protect against cross-site scripting?

Escaping text for the place it is used is the main defence, but the right escaping depends on the context, such as an attribute, a script block or a URL. Use your framework's own escaping for real pages.

Why decode with a textarea element?

It reads entities exactly as a browser does, including the full named list, and it never runs scripts, so pasting untrusted HTML is safe.

Are entities like &nbsp; kept?

Decoding turns &nbsp; into a real non-breaking space character, which looks like a normal space but is a different character.

Does it handle emoji?

Yes. Decoding works for any character. With the non-ASCII option, an emoji is written as one numeric entity, not two surrogate halves.

Related tools