HTML entities

Escape text for safe insertion into HTML or decode &-entities back to characters. A searchable reference of named entities is right below.

Escape text for safe insertion into HTML or decode &-entities back to characters. A searchable reference of named entities is right below.

How to use

  1. Paste text or HTML
  2. Pick Escape or Unescape
  3. Copy the result, or look an entity up in the table

Frequently asked questions

Which characters must be escaped in HTML?

At minimum < > & and quotes inside attributes — otherwise the browser treats them as markup.

What's the difference between &amp;#39; and &amp;apos;?

Both mean an apostrophe; the numeric form works everywhere, while &apos; is safe in HTML5 but not in older HTML.

Does escaping protect against XSS?

Escaping output is one of the core defenses, but context matters (attributes, URLs, JS) — each needs the right escaping.