JSONToonPro
Encoding tool

HTML Decode

Convert HTML entities like the encoded ampersand and angle brackets back into their original characters, decoding both named entities and numeric character references. Everything runs 100% client-side in your browser.

100% client sideInstant resultNo data sent
Encoded HTML entities
0 chars
Decoded text
Result appears here...

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

4 answers
HTML decoding is the reverse of encoding: it takes text that contains HTML entities and converts those entities back into the characters they represent. So a named entity for the ampersand turns back into a literal ampersand, and an encoded angle bracket becomes a real less-than or greater-than sign. Paste encoded text and this tool returns the original, readable characters instantly.

More JSON Tools

About HTML Decode

Scraped pages, exported database fields, RSS feeds, and API responses often arrive with their text still HTML encoded, full of entities that make the content hard to read. This HTML decoder reverses that encoding: it recognizes named entities, decimal numeric references, and hexadecimal references, and rewrites every one of them back to its original character in a single pass. It is ideal for cleaning up scraped content, inspecting encoded email bodies, and turning escaped markup back into readable text. Because it runs entirely in your browser, none of the text you decode ever leaves your device.