ToolPlexa

Free Online HTML Escape / Unescape

Convert special characters to HTML entities or back again when displaying literal markup in a page.

Launch mode: all available tools are free • No account required

HTML Escape / Unescape: A Practical Guide

Use HTML Escape / Unescape to convert special characters to HTML entities or decode entities back into text. Choose the operation according to the context. Escaping for HTML is different from URL encoding, JSON escaping or sanitizing untrusted markup.

How to Use HTML Escape / Unescape

  1. Paste the text.
  2. Choose Escape HTML or Unescape HTML.
  3. Select Process.
  4. Inspect the output before inserting it into another context.

Entities Represent Literal Characters

Escape mode replaces characters such as ampersand, angle brackets and quotes with entity forms. This can help display markup as text rather than having the browser interpret it as an element.

Unescape mode decodes entities. Decoded output can contain active-looking markup, so do not insert it as trusted HTML merely because a tool decoded it. Context-specific escaping and sanitization are separate concerns.

Worked Example

Escaping <b>Hello</b> produces text that can be displayed as literal markup. Unescaping &lt;b&gt; returns angle-bracket text again.

If an already escaped ampersand is escaped again, double-encoding can occur. Track which representation you are handling.

Encode URI components: use the URL Encoder.

Create a supported anchor: use the HTML Link Generator.

Checks and Common Mistakes

  • Choose the correct direction.
  • Do not treat unescaping as sanitization.
  • Avoid double encoding.
  • Use context-specific protection for attributes, scripts and URLs.

Frequently Asked Questions

Will escaping make any HTML safe everywhere?

No. Safety depends on the insertion context and the appropriate escaping or sanitization method.

Is this the same as URL encoding?

No. They use different representations for different contexts.

Why do I see &amp;lt;?

The text may have been escaped twice.

Related Tools for the Next Step

Reference

Further reading: MDN character references.

Scroll to Top