EllyTools

Image Tools

Calculators

Text Tools

Color Tools

File Tools

Utility Tools

HTML Escape & Unescape

Escape and unescape HTML entities instantly

0 chars
0 chars

β—ˆ How to Use

1

Paste your HTML code or text with special characters

2

Click Escape to convert special characters to HTML entities (or Unescape to reverse)

3

Copy the result to use in your HTML code

❓ Frequently Asked Questions

Related Tools

β—‰ Who Is This For?

  • βœ“Web developers encoding HTML for safe display
  • βœ“Bloggers embedding code snippets in posts
  • βœ“Anyone who needs to display HTML code as text on a webpage

β˜… Why Choose EllyTools?

100% Free & Unlimited

No sign-up, no limits. Use as many times as you want.

Privacy First

All processing happens in your browser. Your files never leave your device.

No Installation Required

Works directly in your browser on any device β€” desktop, tablet, or phone.

Fast & Reliable

Instant results powered by modern browser technology.

HTML Escape Tool: Encoding Special Characters Safely

When you want to display HTML code as text instead of having it rendered, special characters like <, >, &, " need to be escaped to their entity forms. This tool handles that conversion both ways.

HTML reserves certain characters for syntax: < starts a tag, & starts an entity, " delimits attributes. To display these characters literally in HTML, they have to be escaped: < becomes &lt;, > becomes &gt;, & becomes &amp;, " becomes &quot;. This is essential for showing code samples or any user-provided text inside HTML.

The reverse β€” unescaping β€” converts the entities back to their original characters, useful when reading HTML source or processing data that's already escaped.

Common HTML entities

CharacterEntityNumeric
<&lt;&#60;
>&gt;&#62;
&&amp;&#38;
"&quot;&#34;
'&apos;&#39;
non-breaking space&nbsp;&#160;

Extended FAQ

Why does '&' need escaping?

Because & itself starts an HTML entity. If you write 'A & B' in HTML, browsers may try to interpret '& B;' as an entity. Escaping & to &amp; makes the literal ampersand unambiguous.

Is escaping the same as URL encoding?

No β€” different contexts use different escaping rules. URL encoding (percent-encoding) uses %20 for space; HTML uses &nbsp;. Don't mix them.

Are my pasted strings stored?

No β€” runs entirely in your browser.

What is HTML Escaping?

HTML escaping converts special characters like <, >, &, ", and ' into their corresponding HTML entities (&lt;, &gt;, &amp;, &quot;, &#39;). This prevents browsers from interpreting them as HTML markup, which is essential for displaying code snippets, preventing XSS attacks, and ensuring content renders correctly.

Unescaping reverses this process, converting HTML entities back to their original characters. This tool handles both named entities (like &nbsp;) and numeric entities (like &#169; or &#x00A9;).