Find your next tool

Browse tools or search by task

Explore JSONToonPro

Encoding & Decoding Tools

HTML Decode Online – HTML Entity Decoder

Decode HTML entities into their original characters online. Convert named and numeric entities such as & and ' in your browser.

Runs locally in your browser. Nothing you paste is uploaded.

HTML Decode workspace
Encoded HTML entities
0 chars
Decoded text
Result appears here...

How HTML Entity Decoding Works

Paste HTML character references to recover their characters. The decoded output is text for inspection and copying. Decoding is not sanitization and should not be used as permission to insert the result into a live page.

Named and Numeric Entities

Named entities identify characters by name, while decimal and hexadecimal references identify code points. Proper semicolons make parsing less ambiguous. The browser’s HTML parser determines how supported references are interpreted.

HTML Decode Examples

& decodes to an ampersand and ' to an apostrophe. Decoding <script> produces angle-bracket markup text; treat that result as untrusted source rather than executable content.

HTML Decode vs URL Decode

HTML entity decoding handles references used in markup. URL decoding interprets percent escapes. A string can contain both layers, and each should be decoded only in the context required by the application.

Handling Unicode Entities

Unicode references can represent symbols outside ASCII. Inspect replacement characters or unexpected whitespace when the input has invalid references. Decoding does not normalize all visually similar characters.

More examples and technical details

How HTML Decoding Works

Decoding walks the text looking for an ampersand. When it finds one it reads forward to the next semicolon and inspects what sits between them. If the content is a known entity name it substitutes that character. If it begins with a hash it is a numeric reference, and the digits are read as a Unicode code point. If it begins with a hash followed by x it is hexadecimal. Anything that does not match a valid pattern is left exactly as it was found.

& named -> &
& numeric -> & (decimal code point 38)
& hexadecimal -> & (hex 26 = decimal 38)
€ numeric -> euro sign (code point 8364)
€ hexadecimal -> euro sign (same character)
 
Names are case sensitive: &Amp; is not a valid entity.

Worked Example

A product title pulled from a feed often arrives with everything escaped, including characters that never needed it.

Encoded:
Widgets & Gadgets ™ – 20% off, size < 10"
 
Step by step:
& -> &
™ -> trademark sign
– -> en dash
% -> %
&lt; -> <
&quot; -> "
 
Decoded:
Widgets & Gadgets (TM) (dash) 20% off, size < 10"

If the source was double encoded you will see &amp;amp; in the input and a single &amp; in the output. Decoding again gives the literal ampersand, and the presence of that pattern tells you an upstream pipeline is escaping twice.

Where You Meet Encoded HTML

  • Scraped pages. Extracting text from markup leaves entities behind unless the scraper resolves them.
  • RSS and Atom feeds. Titles and descriptions are escaped so they can sit inside XML elements, frequently twice.
  • Database columns. Legacy applications that escaped on write rather than on render leave entities baked into stored rows forever.
  • JSON API responses. Fields destined for a web page are often pre-escaped by the server, which breaks mobile clients that render plain text.
  • HTML email. Marketing tooling escapes aggressively, and the raw source is full of &nbsp; and numeric references.
  • CSV exports. Text pulled from a CMS and dumped to CSV keeps its entities and looks broken in a spreadsheet.

Decoding Reintroduces Risk

Never decode HTML and then insert it into a pageDecoding converts <script> back into a live tag. If you write that result into the DOM as markup, you have reversed the exact protection that made the content safe. Decode only when the destination treats the result as plain text: a terminal, a log, a text node, a spreadsheet cell, or a mobile label.

If you do need to render decoded content as markup, run it through a sanitiser that works on the parsed tree and allows only a known list of elements and attributes. Filtering with regular expressions is not sufficient, because the HTML parser accepts far more variations than any pattern will anticipate.

HTML Entity Reference Table

Named entities are easier to read, numeric entities work everywhere including XML where only five names are predefined. Both forms always end with a semicolon.

CharacterNamed entityNumeric entityDescription
&&amp;&#38;Ampersand
<&lt;&#60;Less than, opens a tag
>&gt;&#62;Greater than, closes a tag
"&quot;&#34;Double quotation mark
'&apos;&#39;Apostrophe or single quote
(space)&nbsp;&#160;Non-breaking space
©&copy;&#169;Copyright sign
®&reg;&#174;Registered trademark sign
™&trade;&#8482;Trademark sign
 –&ndash;&#8211;En dash
…&hellip;&#8230;Horizontal ellipsis
€&euro;&#8364;Euro sign
£&pound;&#163;Pound sign
°&deg;&#176;Degree sign
×&times;&#215;Multiplication sign

Working on something related? Browse every free developer tool on the site, including a HTML encoder, URL decoder, Base64 decoder, and text utilities. Everything runs entirely in your browser, so nothing you paste is ever uploaded.

Frequently asked questions

How do I decode HTML entities?

Paste the entity-encoded string in Decode mode and copy the characters.

Can it decode numeric entities?

Yes. Decimal and hexadecimal numeric references are supported by browser parsing.

What is the difference between HTML and URL decoding?

HTML decoding resolves character references; URL decoding resolves percent escapes.

Can decoded HTML contain markup?

Yes. The decoded text may contain markup, so do not inject it unsafely into HTML.

Is text uploaded?

No. Input is processed in this browser tab and is not uploaded by the tool. Copy and download are actions you control; ordinary page analytics do not receive tool input.