HTML entity decoder

Paste escaped HTML, an RSS title or a database dump full of & and read the plain text.

Tier 0 · browser · unlimited
Reverse conversion
71 characters
Output
<h1>Café & Crème — 50% off</h1>

Where escaped text comes from

Text copied out of HTML source, RSS feeds, XML exports, APIs and old databases often shows up with its escaping still in place: Fish &amp; Chips, It&#39;s, &quot;quoted&quot;. A character reference starts with & and ends with ;. In between is either a name defined by HTML (amp, eacute, copy) or a number: decimal after &#, hexadecimal after &#x.

This decoder handles all three forms and leaves anything it does not recognise untouched, so ordinary ampersands in prose are safe.

Worked example

&lt;h1&gt;Caf&eacute; &amp; Cr&egrave;me &#8212; 50&#37; off&lt;/h1&gt; decodes to <h1>Café & Crème — 50% off</h1>. &#8212; is the decimal code point of the em dash (U+2014) and &#37; is the percent sign.

Double escaping

If you see &amp;amp; the text was escaped twice. One pass gives &amp;, which is what a browser would display; decode again to get &.

How this works

The decoder scans for sequences that start with & and end with ;. Numeric references are converted from their decimal or hexadecimal code point; invalid code points (surrogates or values above U+10FFFF) become the replacement character �, as browsers do. Named references are looked up in a table of the 200 most common names from the WHATWG HTML standard: accented letters, punctuation, currency symbols, arrows, Greek letters and maths operators. Unknown names are kept as written. Switch to Encode for the reverse. Everything runs in this tab.

Frequently asked

What does &amp;amp; mean?

The text was escaped twice. Decoding once gives &amp;, which displays as &. Decode again to get a plain &.

What is &#39;?

An apostrophe ('), written as a decimal reference. &#x27; is the same character in hex.

Does this run the HTML?

No. It only replaces character references with characters; nothing is rendered or executed.

Why is a name left undecoded?

HTML defines over 2,000 names; this page knows the 200 most used. Numeric references always work.

Sources

Reviewed Oct 17, 2026 · test vectors fixtures/dev/html-decode/