HTML Escape/Unescape

Convert between HTML special characters and entities

Conversion Type
Input
Result
Read-only

What is HTML Escape / Unescape?

HTML Escape / Unescape is a tool for converting HTML special characters into safe text and converting escaped text back again. It is useful when you want to display code examples as text, inspect escaped HTML strings, or quickly check how a string changes in either direction.

You can switch between escape and unescape modes, and the result updates in real time. Everything is handled in the browser.

How to Use

  1. Choose either “Escape” or “Unescape”.
  2. Paste or type text into the input area.
  3. Review the converted result on the right.

This makes it easy to compare a raw HTML fragment with its escaped form right away.

Main Conversions

Escape

This converts characters such as <, >, and & into forms that are safer to display inside HTML.

<div>Hello World</div>

becomes:

&lt;div&gt;Hello World&lt;/div&gt;

Unescape

This converts escaped strings such as &lt; and &gt; back into their original HTML characters. It is useful when you want to inspect or restore escaped markup.

Use Cases

  • Displaying HTML code examples in blogs or documentation
  • Checking escaped HTML strings
  • Reviewing how template or form input text should be treated
  • Quickly converting copied HTML snippets in either direction

Things to Keep in Mind

  • This tool helps you inspect and convert strings, but it does not replace full application-level XSS protection
  • If you unescape content and then render it, you still need to make sure that usage is safe for the target context
  • Escaping for code display and sanitizing for application security are related but not identical tasks