---
title: "HTML Escape/Unescape - Convert HTML special characters both ways"
description: "Convert HTML special characters and HTML entities in both directions. Escape symbols such as & and <>, or restore escaped strings to their original form. Useful for displaying code examples and checking converted output."
canonical_url: "https://web-toolbox.dev/en/tools/html-escape-unescape"
meta:
  author: K
  "og:description": "Convert HTML special characters and HTML entities in both directions. Escape symbols such as & and <>, or restore escaped strings to their original form. Useful for displaying code examples and checking converted output."
  "og:image": "https://web-toolbox.dev/og/en/tools/html-escape-unescape-682a8d1d.png"
  "og:image:alt": "HTML Escape/Unescape"
  "og:image:height": "630"
  "og:image:width": "1200"
  "og:title": "HTML Escape/Unescape - Convert HTML special characters both ways"
---

> Index of every page on this site: [llms.txt](https://web-toolbox.dev/llms.txt)

# **HTML Escape/Unescape**

Convert between HTML special characters and entities

Conversion Type

**HTML Code**

0

**Converted Result**

Read-only

0

## What is HTML Escape / Unescape Tool?

HTML Escape / Unescape converts HTML special characters into entities and restores escaped strings to their original form. It is useful when you want to display code examples as text or inspect the contents of escaped strings.

Switching the conversion type lets you check both directions right away. 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.

## Main Settings

### Conversion Type

Choose the direction of the conversion.

- Escape: converts characters such as `**<**`, `**>**`, and `**&**` into forms that display as text inside HTML
- Unescape: converts escaped strings such as `**&lt;**` and `**&gt;**` back into their original characters

```html
<div>Hello World</div>
```

becomes:

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

## Use Cases

- Displaying HTML code examples in blogs or documentation
- Checking escaped HTML strings
- Reviewing how template or form input text should be treated

## 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

**How was your experience?**

Last updated: October 20, 2024

### **Related Tools**

- [<h4>**JWT Decoder**</h4>](https://web-toolbox.dev/en/tools/jwt-decoder)
- [<h4>**JSON Formatter**</h4>](https://web-toolbox.dev/en/tools/json-formatter)
- [<h4>**Regex Checker**</h4>](https://web-toolbox.dev/en/tools/regex-checker)
- [<h4>**SQL Formatter**</h4>](https://web-toolbox.dev/en/tools/sql-formatter)
- [<h4>**UUID Validator**</h4>](https://web-toolbox.dev/en/tools/uuid-validator)
- [<h4>**XML Formatter**</h4>](https://web-toolbox.dev/en/tools/xml-formatter)
- [<h4>**URL Encode/Decode**</h4>](https://web-toolbox.dev/en/tools/url-encode-decode)
- [<h4>**Base64 Decode**</h4>](https://web-toolbox.dev/en/tools/base64-decode)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://web-toolbox.dev/en#website","@type":"WebSite","description":"アカウント登録不要で使える無料Web開発ツール80種類以上。JSON整形、Base64変換、カラーコード変換、QRコード生成などをブラウザ上で瞬時に実行。開発者の作業効率を大幅に向上させます。","inLanguage":"en-US","name":"Web ToolBox","url":"https://web-toolbox.dev/en","translationOfWork":{"@id":"https://web-toolbox.dev/#website"}},{"@id":"https://web-toolbox.dev/en/tools/html-escape-unescape#webpage","@type":"WebPage","description":"Convert HTML special characters and HTML entities in both directions. Escape symbols such as & and <>, or restore escaped strings to their original form. Useful for displaying code examples and checking converted output.","name":"HTML Escape/Unescape - Convert HTML special characters both ways","url":"https://web-toolbox.dev/en/tools/html-escape-unescape","breadcrumb":{"@id":"https://web-toolbox.dev/en/tools/html-escape-unescape#breadcrumb"},"isPartOf":{"@id":"https://web-toolbox.dev/en#website"},"potentialAction":[{"@type":"ReadAction","target":["https://web-toolbox.dev/en/tools/html-escape-unescape"]}]},{"@id":"https://web-toolbox.dev/en/tools/html-escape-unescape#/schema/web-application/1","@type":"WebApplication","applicationCategory":"UtilityApplication","description":"Convert HTML special characters and HTML entities in both directions. Escape symbols such as & and <>, or restore escaped strings to their original form. Useful for displaying code examples and checking converted output.","name":"HTML Escape/Unescape - Convert HTML special characters both ways","operatingSystem":"Windows, macOS, Linux, Android, iOS"},{"@id":"https://web-toolbox.dev/en/tools/html-escape-unescape#breadcrumb","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://web-toolbox.dev/en","position":1},{"@type":"ListItem","name":"Code","item":"https://web-toolbox.dev/en/categories/code","position":2},{"@type":"ListItem","name":"HTML Escape/Unescape","item":"https://web-toolbox.dev/en/tools/html-escape-unescape","position":3}]}]}
```

## Sitemap

See the full [sitemap](https://web-toolbox.dev/sitemap.md) for all pages.
