Free Online Tool

HTML Entity Encoder

Convert special characters to HTML entities for web-safe display.

How to Use HTML Entity Encoder

  1. Paste the text or HTML you want to make safe into the input box.
  2. Encode replaces reserved characters (& < > " ') with HTML entities so they render as text instead of markup; decode reverses it.
  3. Choose named (&amp;), decimal (&#38;), or hex (&#x26;) entity output.
  4. Copy the result. Nothing is uploaded β€” it is processed in your browser.

Encoding reserved characters prevents them from being interpreted as tags or breaking attributes, which also helps avoid injection when displaying user text.

Examples

Encode HTML β€” input:

<b>"Tom & Jerry"</b>

Output:

&lt;b&gt;&quot;Tom &amp; Jerry&quot;&lt;/b&gt;

Ampersand β€” input:

Fish & Chips

Output:

Fish &amp; Chips

Decode (reverse) β€” input:

&lt;p&gt;Hi&lt;/p&gt;

Output:

<p>Hi</p>

Decoding turns entities back into their original characters.

Features

Privacy Focused

All processing happens in your browser. No data is sent to servers.

Free Forever

No registration, no limits, completely free to use.