---
title: "HTML unescape"
description: "Decode the five core HTML entities back to characters. Other named entities are left unchanged."
---

> HTML: https://trendalyzer.app/tools/html-unescape/
> Index: https://trendalyzer.app/llms.txt

# HTML unescape

HTML unescape converts the five core structural entities — `&amp;`, `&lt;`, `&gt;`, `&quot;`, and `&#39;` — back to literal text in a single pass that decodes specific entities before the ampersand. Other named entities are left unchanged. It is narrower than a full HTML parser.

Readiness: experimental

Input types: text

Output types: text

## Limits

- Only the five entities this site writes are reversed.

## Warnings

- Named entities beyond amp, lt, gt, quot, #39 are left as-is.

## Example

Input: a&lt;b

Output: a<b

## Steps

1. **Paste the entity-encoded string** — Use text that contains `&amp;`, `&lt;`, `&gt;`, `&quot;`, or `&#39;` from feeds, scrapes, or escaped form values.
2. **Run locally** — Specific entities decode before `&amp;`, so `&amp;lt;` stays the literal string `&lt;` instead of becoming `<`.
3. **Use the plain text carefully** — Treat the result as untrusted if you later inject it into HTML — unescape is not a sanitizer.

## Order matters

Decoding `&amp;` before `&lt;` would turn `&amp;lt;` into `<`. This tool decodes the specific entities first, then the ampersand entity.

## Scope

Entities such as `&nbsp;` or `&copy;` are left as-is. Use a full HTML parser when you need the entire named-entity set.

## FAQ



### In what order are HTML entities decoded?

Specific entities (&lt;, &gt;, &quot;, &#39;) are decoded before the ampersand entity (&amp;). This prevents accidental double-decoding where '&amp;lt;' might improperly resolve to '<' in a single pass.

### Are all 2,000+ HTML5 named entities supported?

This tool specifically targets the five core structural entities (&amp;, &lt;, &gt;, &quot;, &#39;) used for safe HTML text emission.

### Can unescaping untrusted HTML introduce XSS into my application?

Yes. If you unescape user-generated HTML entities and inject the resulting raw string into a DOM element (e.g. via innerHTML), malicious scripts can execute. Unescape only when rendering in safe plain-text contexts.
