Practical tools for your next project. Free to use.
Free browser-based developer tool

HTML Escape
& Unescape Tool

Convert special HTML characters into HTML entities and decode escaped HTML text back into readable characters. Use this free tool when preparing text for HTML, inspecting entity-encoded content, debugging snippets and working with web development data.

Home / All tools / HTML Escape
✓ Free to use ✓ No account required ✓ Conversion in your browser
HTML conversion workspace
Escape special characters or decode HTML entities.
0 characters
0 characters

Escape converts ampersands, angle brackets, quotation marks and apostrophes into HTML entities.

Ready. Enter text and select Convert.

Privacy: This tool performs conversion in your browser. The conversion code does not submit your input to a PHP endpoint.

✦ QUICK START GUIDE

How to escape HTML online

HTML escaping replaces characters that have special meaning in HTML with entity representations. This can help you display text literally instead of having the browser interpret it as markup.

  1. 01

    Enter your text

    Paste an HTML snippet, plain text or content containing characters such as <, >, & or quotation marks.

  2. 02

    Choose the conversion mode

    Select Escape HTML to encode special characters, or Unescape HTML to decode supported HTML entities.

  3. 03

    Convert and copy the result

    Select Convert, review the output and copy it or download it as a text file for your development workflow.

Important: Escaping text is context-dependent. HTML text, HTML attributes, JavaScript and URLs each have different encoding requirements.

</> HTML FUNDAMENTALS

What is HTML escaping?

HTML escaping converts certain characters into representations that can be included as text in HTML. For example, the less-than character can be represented by &lt;, and the ampersand by &amp;.

HTML entities may use named forms, such as &quot;, or numeric forms, such as &#39;. This tool uses a consistent set of common entities for escaping and a browser HTML parser for unescaping.

BEFORE ESCAPING
<p title="Example">Tom & Jerry</p>
AFTER ESCAPING
&lt;p title=&quot;Example&quot;&gt;Tom &amp; Jerry&lt;/p&gt;

Common HTML entities

  • &lt; represents the less-than character (<).
  • &gt; represents the greater-than character (>).
  • &amp; represents the ampersand (&).
  • &quot; represents the double quotation mark (").
  • &#039; represents the apostrophe (').
? COMMON QUESTIONS

Frequently asked questions

What does an HTML escape tool do?

It converts selected special characters into HTML entities so they can be represented as text in an HTML context rather than interpreted as markup.

What is the difference between HTML escape and unescape?

Escaping converts characters such as <, > and & into entity forms. Unescaping converts supported HTML entities back into their corresponding characters.

Does HTML escaping make a website completely secure?

No. Escaping is only one part of safe output handling. The correct encoding depends on where data is placed. HTML text, quoted attributes, JavaScript, CSS and URLs require different handling. Use context-appropriate escaping and never rely on this tool alone to prevent cross-site scripting (XSS).

Will escaped HTML display as text in a browser?

When correctly inserted into an HTML text context, escaped markup is generally displayed as text rather than being interpreted as HTML elements. The result depends on the surrounding document and context.

Can I use this tool to escape HTML attributes?

This tool converts common HTML special characters, but production attribute handling must account for the exact context. Use quoted attributes and a context-aware escaping function in your application.

Does unescaping HTML execute scripts?

This tool returns decoded text in a textarea and does not insert the result into the page as executable markup. However, inserting decoded content into a live HTML document can create security risks. Treat untrusted content carefully.

Is my text uploaded to a server?

No server request is used for the conversion performed by this page. The JavaScript processes the input locally in your browser.

Is this HTML escape tool free?

Yes. You can use the HTML escape and unescape functions without creating an account.