Skip to content
Jellykit

HTML Entity Encoder

Convert special characters to HTML entities (< & ") and decode entities back to text. Free tool for safe HTML snippets and email templates.

Runs in your browser. Nothing is uploaded.

About HTML Entity Encoder

Characters such as <, > and & have special meaning in HTML. To display them as text, for example in a code sample, they must be written as entities: &lt;, &gt; and &amp;.

Encode a snippet before pasting it into a blog post or CMS, or decode entity-filled text you've scraped or received in an email.

How to use HTML Entity Encoder

  1. Open the tool above and add your file or text.
  2. Adjust the options to suit.
  3. Download or copy the result. Nothing is uploaded at any point.

Frequently asked questions

Does escaping HTML prevent XSS?

Escaping text placed between HTML tags is one essential defence, but attributes, URLs and scripts need context-specific escaping too.

What is &nbsp;?

A non-breaking space: it looks like a space but stops a line from breaking at that point.

Is HTML Entity Encoder free and private?

Yes. HTML Entity Encoder is completely free with no sign-up. Everything runs in your browser, so whatever you type or paste never leaves your device.

See all developer tools →