Skip to content

HTML Entity Decoder

Decode HTML entities back to readable characters online. Free HTML entity decoder for converting ampersand codes to plain text.

About HTML Decoding

HTML decoding converts HTML entities back to their original characters. This tool supports named entities (like <), numeric entities (like <), and hexadecimal entities (like <).

Example:

Input: <h1>Hello World</h1>
Output: <h1>Hello World</h1>

Supported Entity Types

  • Named entities: &lt;, &gt;, &amp;, &quot;, &nbsp;, etc.
  • Decimal entities: &#60;, &#62;, &#38;, etc.
  • Hexadecimal entities: &#x3c;, &#x3e;, &#x26;, etc.

How to Use HTML Entity Decoder

1

Paste HTML-encoded text

Paste content containing HTML entities (&lt;, &amp;, &copy;, &#x4E2D;, etc.) into the input field.

2

View decoded output

All entities are converted back to their original characters. The output is the human-readable form of your encoded input.

3

Treat output carefully

Decoded output may contain active HTML markup. If from untrusted sources, sanitize before re-displaying. Don't insert decoded HTML directly into pages without consideration.

4

Copy or process

Click Copy to use the decoded text elsewhere. Useful for processing scraped HTML, parsing emails, or working with stored entity-encoded text.

When to Use HTML Entity Decoder

Processing scraped web content

When scraping HTML pages, the captured content often contains HTML entities. Decoding restores readable text for analysis, storage, or display — particularly when you are extracting email bodies, scraping articles, capturing product descriptions, or doing any other HTML-from-the-web processing.

Cleaning up email content

Email bodies frequently arrive littered with HTML entities like &copy;, &nbsp;, &mdash;, and &amp;, which look fine when rendered but turn into noise once you extract plain text. Decoding restores readable output, which matters for email automation, content classification, search indexing, and AI processing where the entities would otherwise pollute the text.

Database content normalization

Legacy databases or content management systems may store HTML-encoded text in fields. To migrate to a system using plain Unicode (or to display in non-HTML contexts), decode the entities. Common when migrating between CMSes or moving from HTML-storing fields to Markdown/plain text.

Decoding stored entity-encoded text

Some storage systems escape HTML at write time, storing &lt; instead of <. To use this content as plain text or in non-HTML contexts (JSON exports, CSV files, plain-text exports), decode it back to the original characters.

HTML Entity Decoder Examples

Basic decoding

Input
&lt;p&gt;Hello, World!&lt;/p&gt;
Output
<p>Hello, World!</p>

HTML entities are converted back to their literal characters. Now you can see this is a paragraph with 'Hello, World!' content. Treat carefully — this is now potentially active HTML markup.

Mixed entity types

Input
&copy; 2024 Company &reg; &mdash; All rights reserved
Output
© 2024 Company ® — All rights reserved

Named entities (&copy;, &reg;, &mdash;) decode to their respective Unicode characters. Modern HTML5 supports ~250 named entities for common characters. The decoder recognizes all of them.

Numeric entities

Input
&#65;&#x42;&#67;
Output
ABC

Numeric entities can be decimal (&#65; for A) or hexadecimal (&#x42; for B). Both decode correctly. Useful when content has unusual or non-ASCII characters represented numerically.

Tips & Best Practices for HTML Entity Decoder

  • 1.Decoded HTML is potentially dangerous. Treat the output the same as raw user input — never re-insert into HTML without sanitization or re-encoding.
  • 2.Watch for double-encoded content. '&amp;lt;' decodes to '&lt;' which decodes to '<'. Run the decoder twice for double-encoded input. Triple-encoded is rare but possible.
  • 3.For large amounts of content (millions of records), decode in batches to avoid memory pressure. Most decoders handle MB-sized inputs fine; GB-sized may need streaming.
  • 4.After decoding, validate that the output makes sense for your context. Decoded HTML should look like normal text or markup — if you see unexpected characters, the source might use a different encoding entirely (URL-encoded, base64, custom escaping).
  • 5.When migrating decoded content to systems expecting plain text (CSV, JSON exports), strip any remaining HTML tags. Use an HTML stripper after decoding for plain-text output.
  • 6.For accessibility, decoded text-to-speech is more natural than HTML-encoded text (screen readers read &amp; as 'amp;' instead of 'and'). Decode user-facing displays whenever possible.

Frequently Asked Questions

HTML decoding is the reverse of HTML encoding — it converts HTML entities (&lt;, &gt;, &amp;, &quot;, etc.) back to their original characters (<, >, &, "). Used when you have encoded HTML and need the original text, especially for processing email content, parsing scraped HTML, or displaying entity-encoded text.