devjar tools
English

HTML Entity Encoder / Decoder

Paste and it converts right away.

Direction

Output


      

How to use

  1. Choose “Encode” or “Decode” and paste your text.
  2. Encoding replaces only the five characters & < > " ' by default. Choose “Also non-ASCII” when a legacy system needs every accented letter or emoji as a numeric entity.
  3. Decoding turns named entities such as &copy; and numeric ones such as &#233; back into characters.

Encoding <div class="a">Tom & "Jerry"</div> gives &lt;div class=&quot;a&quot;&gt;Tom &amp; &quot;Jerry&quot;&lt;/div&gt;. Decoding &copy; &lt; &#x1F600; &#233; gives © < 😀 é.

FAQ

Why do these characters need escaping?

< and & start tags and entities in HTML, so to show them as text you write &lt; and &amp;. Inserting user text into HTML without escaping breaks the page or opens it to script injection (XSS).

Why is the single quote &#39;?

&apos; did not exist in HTML 4, so some old browsers and email clients do not decode it. The numeric &#39; works everywhere.

Can decoding run scripts?

No. The browser’s HTML parser is used only inside a text box, so entities become characters while tags and scripts stay plain text.