Decode HTML entities back to readable text online for free with this HTML entity decoder. The tool converts entity codes — named (&) and numeric (&) — back into their original characters so you can recover plain text from encoded HTML, exports, or database dumps. Paste your encoded text and get the decoded version in seconds.
Entities like < or < exist so reserved characters display safely on a page; decoding reverses that, turning the codes back into the real characters. This is useful when a CMS, API, or scraped page has stored text in encoded form and you want the plain version. To go the other way, use the HTML Entities Encoder.
An HTML entity decoder recovers the original characters hidden inside encoded text — essential when a CMS, RSS feed, or API has double-escaped a string and you need the plain value back. Decoding turns & into &, < into <, and the hundreds of numeric entities like ’ into their proper punctuation, so the text reads correctly instead of showing raw codes.
This unescape HTML online tool also handles edge cases that manual Find-and-Replace misses: hexadecimal entities ('), legacy entity names ( , ©), and mixed encoded/plain text in the same input. Because decoding runs entirely in your browser, you can safely unescape scraped content, database exports, or form submissions without uploading anything to a third-party service.
Named and numeric entities alike are converted back to their original characters:
<a href="x">Tom & Jerry © 2026</a><a href="x">Tom & Jerry © 2026</a> An HTML entity is an escape sequence — a named reference like ©, a decimal one like ©, or a hex one like © — that the browser renders as a single character. Decoding scans the text for these sequences and replaces each one with the character it stands for, leaving plain text untouched. The result is the original, human-readable content without the escaping layer.
You typically meet encoded text in three places: scraped or exported HTML where reserved characters were escaped; database fields or API responses that store content safely; and email or CMS content that double-escaped ampersands. A decoder restores the readable form for editing or display. It recognises all three entity styles — named, decimal numeric, and hex numeric — and converts them uniformly.
A careful decoder only replaces true entities and leaves unrelated text (such as a literal & that is already a plain ampersand, or text that merely looks like an entity) alone, so normal prose is never corrupted. After restoring the text, you can compress or reformat any surrounding markup with the HTML Minifier or HTML Beautifier.
© without a trailing semicolon), legacy or strict decoders will skip them. Ensure your source data adheres to the standard &name; syntax. <script>). Never assign decoded strings directly to element.innerHTML without prior DOM sanitization. &#x (or &#X). If the x prefix is omitted, the parser will treat the value as decimal, resulting in incorrect Unicode character mapping. &lt;) will only unescape one level per pass (turning into <). A second decode pass is required to reach the raw character. HTML documents, APIs, and RSS feeds represent characters across three distinct escape notations. A compliant decoder resolves all three into identical UTF-8 characters:
| Decoded Character | Named Entity | Decimal Code | Hexadecimal Code | Unicode Code Point |
|---|---|---|---|---|
| & | & | & | & | U+0026 |
| < | < | < | < | U+003C |
| > | > | > | > | U+003E |
| © | © | © | © | U+00A9 |
| ™ | ™ | ™ | ™ | U+2122 |
Restore encoded HTML entities in data pipelines and server-side processors using these clean language examples:
function decodeHtml(htmlString) {
// In modern browsers, DOMParser provides safe decoding
if (typeof DOMParser !== 'undefined') {
const doc = new DOMParser().parseFromString(htmlString, 'text/html');
return doc.documentElement.textContent || '';
}
// Node.js fallback or regex map for core entities
return htmlString
.replace(/&/g, '&')
.replace(/</g, '<')
.replace(/>/g, '>')
.replace(/"/g, '"')
.replace(/'/g, "'");
}import html
def decode_html_entities(encoded_str: str) -> str:
# Resolves all named, decimal, and hex entities
return html.unescape(encoded_str)