What does an HTML entity decoder do?
An HTML entity decoder converts character references back into the characters they represent: & becomes &, é becomes é, € becomes € and 😀 becomes 😀. You need it whenever encoded text ends up somewhere it is shown literally — a CSV export from a CMS, an RSS feed, an API response, a database dump or a WordPress title that displays ’ instead of an apostrophe.
Numeric references are decoded directly, following the same rules as the HTML parser: invalid code points become the replacement character, and the legacy range €–Ÿ maps to the Windows-1252 characters people actually meant (– is an en dash). Named references are decoded by your browser’s own HTML parser in an isolated, inert document, so all 2,000+ HTML5 names — and the old forms without a semicolon such as © — behave exactly as they would on a web page.
Text is often encoded twice by mistake, for example when an already-escaped string is escaped again by a template engine. That produces &lt; instead of <. Enable Decode repeatedly and the decoder keeps going until nothing changes.
How to use the HTML Entity Decoder
- Paste the text containing entities, or click Sample to load named, numeric and double-encoded examples.
- Turn on Decode repeatedly if the text shows
&amp;or&lt;— a sign it was encoded more than once. - Optionally convert non-breaking spaces to normal spaces, which helps when the result goes into a spreadsheet or search index.
- Copy the decoded text. The counters show how many entities were decoded and in how many passes.
Example
One pass versus repeated decoding of double-encoded markup:
Input: &lt;b&gt;Fish &amp; Chips&lt;/b&gt;
One pass: <b>Fish & Chips</b>
Repeated: <b>Fish & Chips</b>Common places you will meet encoded text
- WordPress post titles and excerpts exported through the REST API or a feed, where smart quotes appear as
“and’. - XML sitemaps and RSS feeds, which must escape
&in URLs as&. - JSON returned by older PHP applications that ran
htmlspecialchars()before saving. - Email templates and newsletters, which often encode every non-ASCII character for safety.
Frequently Asked Questions
Is it safe to paste untrusted HTML into the decoder?
Yes. Decoding happens in a detached document that is never displayed, in a <textarea> whose content is parsed as plain text, so scripts cannot run and no images or other resources load. The output is shown as text, never rendered as HTML.
Why does the decoded text contain tags like <b>?
Because the input was escaped HTML. <b> is the encoded form of the tag <b>. If you need to show that markup on a web page again, re-escape it with the HTML Escape Tool.
Why do some entities stay unchanged?
They are not valid character references — for example a typo such as &eacut; or a made-up name. They are listed in a warning so you can fix them. An ampersand that is not followed by a known name, such as in AT&T, is simply left alone, as a browser would.
What is the difference between and a normal space?
decodes to U+00A0, the no-break space. It looks identical but prevents a line break and is not matched by a regular space in search, spreadsheets or code. Tick the conversion option to turn every U+00A0 into U+0020.
How do I encode text into entities?
Use the HTML Entity Encoder, which converts special characters, accents and emoji into named, decimal or hex references.