Skip to content
KitWren
Website

HTML Entity Encoder

Escape <, >, &, quotes and optionally all non-ASCII characters as HTML entities.

  1. Paste your input
  2. Choose the options
  3. Copy the output
Runs in your browser. Your data and files never leave your device.

About the HTML Entity Encoder

Make text safe to show inside HTML by converting special characters to entities such as &amp;lt; and &amp;amp;.

Example

<b>Tom & Jerry</b> becomes &lt;b&gt;Tom &amp; Jerry&lt;/b&gt; — shown on a page as the literal text rather than bold text.

Frequently asked questions

When do I need to encode HTML entities?

Whenever you display user-supplied or code text inside HTML, so it’s shown as text instead of being interpreted as markup. This is also a key defence against cross-site scripting (XSS).

Do I need to encode accented letters?

Not on a UTF-8 page. The option to encode all non-ASCII characters is for systems that can’t handle UTF-8.