Escape HTML entities

Escape or unescape HTML entities (replace characters like <,>, &, " and \' with their HTML version)

About Escape HTML entities

Escapes the five characters that are special in HTML (&, <, >, " and ') into their entity form (&amp;, &lt;, &gt;, &quot;, &#39;), and unescapes such entities back to plain text.

When you would use it

How to use it

  1. To escape, type text in the first field and read the escaped version below it.
  2. To unescape, paste text containing entities in the second section and read the plain text.
  3. Copy the result.

Things worth knowing

Frequently asked questions

Why does &apos; stay as it is after unescaping?
&apos; is an XML entity that older HTML did not define, so this tool, like many libraries, does not translate it. Use &#39; for an apostrophe in HTML.
Do I need to escape text in a JavaScript framework like Vue or React?
Not when using normal text bindings: they escape automatically. Only raw HTML insertion (v-html, dangerouslySetInnerHTML, innerHTML) needs manual care.

All the tools