Toolsky

Free Online Tools & Utilities for Every Task.

HTML Entity Decode

Decode HTML Entities into HTML.

Copy a code sample from a database export, an XML feed or an old CMS and you often get text that looks like &lt;div class=&quot;note&quot;&gt; instead of real markup. That scrambled form is HTML with its characters replaced by entities, and reading or reusing it in that state is painful. An HTML entity decoder reverses the process: paste the encoded text in, and you get the original characters back — &lt; becomes < again, &amp; becomes an ampersand, and the markup turns back into code you can actually use.

Why Text Arrives Encoded in the First Place

Browsers and databases encode special characters deliberately. When HTML is stored as data — inside a database field, an RSS feed, a JSON response or a tutorial page that wants to show code rather than run it — characters such as <, >, & and quotation marks are written as entities so nothing mistakes them for live markup. That protection is sensible, but it leaves the next person holding text that no editor, browser or template can use until it is decoded. Developers hit this when migrating content between platforms, cleaning up exported posts, inspecting what an API actually returned, or recovering code samples from documentation pages where the example was published in escaped form. The decoder is the bridge between that stored, safe representation and working HTML.

What the Decoder Handles

  • Named entities: the familiar word-based forms such as &lt;, &gt;, &amp;, &quot; and &nbsp; are converted back to <, >, &, " and a non-breaking space.
  • Decimal numeric entities: references like &#60; and &#169; are translated to the characters they number — < and © respectively.
  • Hexadecimal entities: forms such as &#x3C; are decoded the same way, which matters because feeds and frameworks mix all three styles freely.
  • Mixed real-world text: encoded passages rarely arrive alone; the decoder processes whole documents, converting entities wherever they appear and leaving ordinary text untouched.
  • Whole blocks at once: paste an entire escaped page or article, not just a line, and get the full readable result in one pass.

If your text is encoded the other way and needs escaping instead, the companion HTML entity encoder does the reverse job, and the URL decoder handles the percent-encoded strings found in web addresses — a different system that is easy to confuse with entities.

How to Decode HTML Entities

  1. Copy the encoded text from its source — a database export, feed, web page or file.
  2. Paste it into the decoder's input area, checking that the whole passage came across, including the end.
  3. Run the decode action and review the converted output in the result area.
  4. Scan the result for anything that still looks encoded; text that was encoded twice needs a second pass (see the tips below).
  5. Copy the decoded HTML and use it in your editor, template or content system.
  6. If the result will be published, open it once in a browser or preview to confirm it renders as expected.

A Worked Example in Three Entity Styles

Suppose a content migration hands you this line from an old blog database:

&lt;p&gt;Fish &amp; Chips: our caf&#233; review&lt;/p&gt;

After decoding, it reads as ordinary markup:

<p>Fish & Chips: our café review</p>

Notice the three different styles in a single short line: named entities for the tags (&lt;, &gt;), a named entity for the ampersand (&amp;), and a decimal numeric entity for the accented character (café). A decoder that only handled one style would leave this line half-scrambled, which is why full coverage matters when you are cleaning real exported content rather than tidy textbook examples.

Tips, Limits and Traps Worth Knowing

Double encoding is the most common surprise. If the output still contains entities, the source was probably encoded twice — once when it was stored and once when it was displayed. Running the decoder a second time usually finishes the job, but check the final result carefully so you do not over-decode text that was meant to stay literal. Decoding changes safety. Encoded text is inert; decoded text is live markup. If you decode content from an untrusted source and then paste it into a web page, any script or event handler hidden inside becomes active again — only decode material you trust, and review what comes out before publishing it. An ampersand alone proves nothing. A lone & that is not part of an entity is left as-is, and browsers are lenient about some malformed references, so a few stray characters can survive decoding harmlessly. Finally, decoding is not cleaning: if you actually want the visible text without any markup at all, strip the tags after decoding with the HTML tags stripper.

Frequently Asked Questions About Decoding HTML Entities

What is an HTML entity, in plain terms?

It is a code that stands in for a character the document cannot or should not contain directly. Instead of a literal <, the text holds the sequence &lt;, and the browser shows < when the page is rendered as content rather than code.

Why does decoding sometimes need two passes?

Because text can be encoded more than once. If a database stored &amp;lt; (an encoded entity that itself encodes <), the first pass produces &lt; and only the second pass produces the actual < character.

Does the decoder handle accented letters and symbols?

Yes, when they are written as entities. Accented characters, currency signs, arrows and similar symbols all have numeric or named references, and decoding converts them back into the real characters, ready for a UTF-8 document.

Is decoding the same as removing HTML tags?

No. Decoding turns escaped text back into genuine HTML, tags included. Removing tags is a separate step that deletes the markup and keeps only the visible words.

Can I decode a whole page of escaped HTML at once?

Yes. The tool is designed for blocks of text, so you can paste an entire exported article or template and decode it in one operation rather than line by line.

What is the difference between entity decoding and URL decoding?

They solve different problems. Entities use the ampersand-and-semicolon style found inside HTML content, while URL encoding uses percent signs, such as %20 for a space, inside web addresses. Text decoded with the wrong tool will stay scrambled.

Is it safe to decode HTML from any source?

Decode it, yes — but be careful where you paste the result. Decoding reactivates markup, so content from untrusted sources should be reviewed before it is placed on a live page, exactly as you would review any pasted code.

From Scrambled Text Back to Working Code

Encoded HTML is a storage format, not a working format. One pass through the decoder turns exports, feeds and escaped examples back into markup you can read, edit and publish — and knowing the difference between single and double encoding saves you the one confusing case where the first attempt looks like it only half worked.