Contact, if you are interested in this website / domain name / Sponsorship / Advertisement / Partnership

HTML Entity Encoder / Decoder

Escape < > & and quotes, or decode entities back to text.

Runs in your browserNo sign-upFree forever

Loading tool…

Report an issue

How to use the HTML Entity Encoder / Decoder

  1. Paste text or HTML.
  2. Click Encode, Encode non-ASCII or Decode.
  3. Copy the output.

About this tool

Characters like <, > and & have special meaning in HTML. To show them literally — in a code sample, a tooltip or user-generated content — they must be written as entities such as &lt;. Failing to escape user input is the root cause of cross-site scripting (XSS), one of the most common web vulnerabilities.

Encode escapes the five critical characters. Encode non-ASCII too additionally converts characters like “é” or “—” into numeric entities, useful for systems that mangle UTF-8. Decode turns entities back into plain text.

Frequently asked questions

Is escaping enough to stop XSS?

It's essential for HTML text content, but attributes, URLs and JavaScript contexts need context-specific encoding. Use your framework's templating.

What's the difference between &amp;nbsp; and a space?

&nbsp; is a non-breaking space that prevents line wraps.

Get a free tech stack audit