Code & web

HTML entity encoder / decoder

Escape <, >, & and quotes to show them in a web page, or decode entities.

Embed this calculator on your website

Copy this code and paste it into your page (WordPress, Wix, Webflow, HTML…). It's free: please keep the link to HOD Calc.

How it works

& → &amp; < → &lt; > → &gt; " → &quot; ' → &#39;. In full mode, every non-ASCII character becomes &#code;.

Results are for guidance only and do not replace professional advice.

Worked example

With the default values:

  • Text<a href="/promo">-20 % & livraison offerte</a>
  • ModeEncode

you get:

  • Length46 → 72

Frequently asked questions

How does the “HTML entity encoder / decoder” tool work?

& → &amp; < → &lt; > → &gt; " → &quot; ' → &#39;. In full mode, every non-ASCII character becomes &#code;.

What do I need to enter?

Just fill in: text, mode. The result updates as you type.

Can you give an example?

Text: <a href="/promo">-20 % & livraison offerte</a>; Mode: Encode → Length: 46 → 72.

Is this calculator free, and is my data private?

Yes. HOD Calc is completely free with no sign-up. The calculation runs in your browser: nothing you type is sent or stored.