What an HTML decoder does
An HTML decoder turns character references, usually called entities, back into the characters they stand for. & becomes an ampersand, < becomes a less-than sign, é becomes é and 😀 becomes 😀. The reverse job is HTML Encoder.
HTML needs entities because a few characters have a job in the markup. A less-than sign opens a tag and an ampersand starts an entity, so a page that wants to show those characters writes them as codes. Entities are also a way to write characters that are hard to type, such as the euro sign or a non-breaking space.
You meet encoded text outside the browser too. Feeds, API responses, database exports, scraped page titles and email templates often carry entities as plain text, and a reader who sees Tom & Jerry's wants Tom & Jerry's.
A worked example
Text as it might arrive from a feed:
Café & crème — © 2026 😀
<a href="/menu?a=1&amp;b=2">Menu</a>
Price: 5 € (€5) &unknown; © 2026After one pass of the decoder:
Café & crème — © 2026 😀
<a href="/menu?a=1&b=2">Menu</a>
Price: 5 € (€5) &unknown; © 2026Named entities, decimal codes, hex codes and an emoji all came back as characters. © without a semicolon was accepted, as a browser would accept it. &unknown; is not an HTML entity, so it stays as written and shows up in the list under the result.
The link in the second line still contains & because it was encoded twice. That is what the next section is about.
Decode HTML entities that were encoded twice
Double encoding happens when text is escaped, stored, then escaped again by another system. The ampersand of < becomes &lt;, and one round of decoding only gets you back to <.
Tick Decode repeatedly and the tool runs again until nothing changes, up to 10 passes, and tells you how many it needed. Run on the example above, the link line becomes <a href="/menu?a=1&b=2">Menu</a>.
The options explained
- Decode repeatedly runs the decoder until the text stops changing. It is the fix for double encoding.
- Require the semicolon decodes only complete entities. Off, the tool follows the HTML5 rules for text: numeric codes without a semicolon and 106 legacy names such as
&,<and©are accepted. - Turn non-breaking spaces into spaces replaces the character that
produces (U+00A0) with a normal space. It looks the same on screen but behaves differently in searches, spreadsheets and code, so you may want it gone.
Longer names are matched exactly. ∉ is the not-an-element-of sign, but ¬it; is not an entity, so the legacy rule reads it as ¬ followed by the text it; and gives ¬it;. Browsers do the same.
Numeric references and odd values
A numeric reference is a Unicode code point written in decimal (©) or hex (©). Both give ©, and an emoji outside the basic range works the same way.
The HTML5 spec has special cases and the tool follows them. Code 0, a value above U+10FFFF and the surrogate range D800 to DFFF decode to the replacement character �. Codes 128 to 159 are read as Windows-1252 characters, so – is an en dash and € is a euro sign, which is how old pages were written.
HTML decode versus URL decode
They solve different problems. HTML entities start with an ampersand, as in &. URL percent-encoding starts with a percent sign, as in %26. If you see %20 or %3D, use URL Decode. If you see \n or \u00e9 inside quotes, that is JSON Unescape.
Want the text without any tags as well? Remove HTML Tags strips the markup and decodes the common entities in one step, but it is not a full decoder. This page knows every named entity in the HTML5 list.
HTML unescape in code
When the job is part of a program, use the platform's own function. In Python:
import html
html.unescape("Café & crème")In JavaScript running in a browser, parse the string and read its text. Never put untrusted text into the live page to do this.
const doc = new DOMParser().parseFromString(input, "text/html");
const text = doc.documentElement.textContent;PHP has html_entity_decode() and Java developers usually reach for a library such as Apache Commons Text. Use this page to check what the correct answer should be for a tricky string.
Limits and safe use
- The decoded result is shown as plain text and is never rendered as HTML, so pasted markup cannot run.
- Decoding does not clean text. If the result still contains tags, they are real tags now.
- Entities that are not in the HTML5 list are left as written. A misspelled name such as
&eacue;is reported, not guessed. - Very large pastes work, but the page can slow down because browsers are slow at laying out huge text boxes.
Decoding happens in your browser. What you paste is not uploaded or stored. See the Privacy Policy for details.