Skip to content

Escape and unescape HTML

Convert characters like <, > and & into safe HTML entities, or turn entities back into plain characters. Essential when displaying user text in a web page.

Your text is processed in your browser as you type. It is not sent to ToolsNest servers or stored after you leave the page.

How to use the HTML Escape / Unescape

  1. 1Paste your text.
  2. 2Select Escape or Unescape.
  3. 3Copy the result.

Supported formats and limits

  • Escapes &, <, >, double quotes and single quotes.
  • Unescape understands named entities (&amp;, &lt;, &nbsp;…) and numeric ones (&#65;, &#x41;).
  • Unknown entities are left untouched when unescaping.

Common uses

  • Showing code samples inside a web page.
  • Cleaning text before inserting it into HTML.
  • Reading entity-heavy text copied from a CMS.

Frequently asked questions

Does escaping make HTML safe to display?

Escaping these five characters prevents the text being read as markup. It is one part of safe rendering, not a complete sanitiser.

Related tools