Skip to content
Mediawand

HTML Entity Encoder and Decoder

Show code or user text on a web page without it being read as HTML, or turn a string full of & and ’ back into plain text. Encoding and decoding are one click apart.

How to encode or decode HTML entities

  1. 1Paste your text or HTML.
  2. 2Choose Encode or Decode.
  3. 3Copy the result.

What gets encoded

The five characters that matter in HTML become entities: & as &amp;, < as &lt;, > as &gt;, " as &quot; and ' as &#39;. Turn on non-ASCII encoding to write letters like é and symbols like € as numeric codes too.

Every entity decoded

Decoding understands every named entity in the HTML standard, like &nbsp;, &copy; and &eacute;, plus decimal and hex codes like &#233; and &#xE9;.

Why escape

Escaping text before putting it into a page stops it from being read as tags, which keeps layouts intact and helps prevent cross-site scripting.

Frequently asked questions

Is my data uploaded?
No. The conversion runs in your browser and nothing is sent anywhere.
Decimal or hex codes?
Both work in every browser. Hex, like &#xE9;, matches how characters are listed in Unicode charts.
Do I need to encode non-ASCII characters?
Not on a UTF-8 page, which is almost every page today. It helps for old systems and some email tools.

Related tools

Loading tools…