EthicalFusion

HTML Decoder

Convert HTML entities back to readable characters.

Was this tool helpful?

Thanks for the feedback!

The HTML Decoder converts entity codes such as &, ’ and ₹ back into the characters they stand for. Use it when text copied from page source, an RSS feed, a WordPress export or an API response is full of ampersand codes and you want the readable version.

A before-and-after example

Paste this encoded line:

Tom & Jerry’s <b>Deal</b>: ₹499 …

and the result is:

Tom & Jerry’s <b>Deal</b>: ₹499 …

The ampersand, curly apostrophe, angle brackets, rupee sign and ellipsis all come back. The <b> tags reappear as plain text; they are not rendered as bold.

A very common source is the WordPress REST API: post titles arrive with typographic punctuation already encoded, so a title typed as "Tom's Guide" comes back as Tom&#8217;s Guide. Decoding gives you the display text with its curly apostrophe.

Which codes it understands

  • Named entities from the full HTML5 list, from the everyday &amp;, &lt;, &gt;, &quot; and &nbsp; to &eacute;, &copy;, &mdash; and &hellip;.
  • Decimal references such as &#8377; (₹) and &#39; (an apostrophe).
  • Hexadecimal references such as &#x20B9;, which is also ₹.

The decoding is done by your browser's own HTML parser, the same one that displays web pages, so it follows the HTML standard exactly, including its lenient handling of a few old entities written without the final semicolon. Codes it doesn't recognise, like a made-up &foo;, are left untouched.

Text that is still encoded after decoding

If the output still contains &amp; or &lt;, the text was encoded twice, which often happens when a CMS escapes content that was already escaped. Decode it a second time. For example, &amp;lt; becomes &lt; after one pass and < after two.

The invisible trap: &nbsp;

A decoded &nbsp; becomes a non-breaking space (U+00A0). It looks like an ordinary space but is a different character, so a spreadsheet lookup, a search in your code or a database comparison may fail to match it. If decoded text will be imported or compared, replace non-breaking spaces with normal ones afterwards.

Using decoded text safely

Decoding turns harmless text back into real markup characters. That is fine for reading, editing or saving to a plain text file, but decoded text from an untrusted source should never be inserted into a web page as HTML, since any <script> tag in it would become live. Nothing runs inside this tool itself, because the result is shown as plain text, and the conversion happens entirely in your browser. To encode text again, use the HTML Encoder; to strip tags and keep only the words, try HTML to Plain Text.

Frequently asked questions

Why does my decoded text still contain entity codes?
Its source was escaped twice. A second pass through the decoder removes the remaining layer.
Does decoding run any HTML or scripts I paste?
No. The result is displayed as plain text in the output box, so tags appear as characters and nothing is executed.
Can it decode numeric codes like &#8377;?
Yes. Both decimal codes such as &#8377; and hexadecimal codes such as &#x20B9; are converted, in this case to the rupee sign.
What is the difference between a decoded nbsp and a normal space?
The nbsp entity decodes to a non-breaking space (U+00A0), a separate character that prevents a line break. It can cause failed matches in spreadsheets and code, so replace it if needed.
Which entity names are supported?
All named entities defined in HTML5, which covers accented letters, punctuation, currency symbols, arrows and maths signs.

Related tools

Embed this tool on your site

Paste it into any blog or website. Free, with a credit link.