Skip to content

HTML unescape

EncodeExperimentalLimited support. Verify anything critical.

HTML unescape converts the five core structural entities — &, <, >, ", and ' — 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.

Skip to the tool

This tool processes text on your device. The text is not uploaded.

  • Only the five entities this site writes are reversed.
  • Named entities beyond amp, lt, gt, quot, #39 are left as-is.

Steps

Paste the entity-encoded string

Use text that contains `&`, `<`, `>`, `"`, or `'` from feeds, scrapes, or escaped form values.

Run locally

Specific entities decode before `&amp;`, so `&amp;lt;` stays the literal string `&lt;` instead of becoming `<`.

Use the plain text carefully

Treat the result as untrusted if you later inject it into HTML — unescape is not a sanitizer.

How to use HTML unescape

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.

How it works

  1. Enter what you haveType or pick your text. Nothing is submitted anywhere.
  2. It runs in this tabThe calculation happens on your device, using your browser's own data.
  3. Take the resultRead the text, then copy or download.

Reimplemented locally. Not derived from IT-Tools source.

Basis
independent
Licence
MIT
Last reviewed

Frequently asked questions

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.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close