jsondecode.com logo

HTML Entity Decoder

Convert HTML entities back to their original characters. Supports named, decimal, and hex entities.

Input
Decoded HTML Output

What is HTML Entity Decoding?

HTML entity decoding converts entity references — named entities like & and ©, decimal numeric entities like ©, and hex numeric entities like © — back to their original characters. This is necessary when working with HTML source code directly, reading database content stored with entity encoding, or processing text scraped from web pages.

Types of HTML entities this tool decodes

  • Named entities&amp; → &, &lt; → <, &gt; → >, &quot; → ", &apos; → ', &nbsp; → non-breaking space, &copy; → ©, &reg; → ®, &trade; → ™, typographic quotes, and dashes.
  • Decimal numeric entities&#169; (decimal 169 = ©), any decimal Unicode code point from 1 to 1114111.
  • Hex numeric entities&#xA9; or &#XA9; (hex A9 = ©), any valid Unicode code point in hexadecimal.

Where you encounter HTML-encoded text

  • Web scraping — scraped page content often contains entity-encoded characters that need decoding before text processing.
  • CMS and blog platforms — WordPress, Drupal, and similar systems store or display certain content with HTML entities.
  • RSS / Atom feeds — XML-based feeds encode < and & inside CDATA or text nodes.
  • API responses returning HTML snippets — some APIs return HTML-encoded strings rather than raw text.
  • Database exports — legacy systems may have stored text with HTML entities; decoding is required before display in non-HTML contexts.

Frequently asked questions

Is it safe to render decoded HTML in a page?

Not automatically. Decoding turns &lt;script&gt; back into <script>. If you inject that decoded string into the DOM with innerHTML or dangerouslySetInnerHTML, you introduce XSS risk. Decode for reading and analysis; do not re-insert decoded untrusted content into HTML without re-sanitising it.

Why does &nbsp; look like a space but behave differently?

A non-breaking space (U+00A0) looks identical to a regular space but prevents line wrapping and is not matched by a simple space in string comparisons or regex patterns. If your text processing treats &nbsp; as a space and comparisons still fail, the decoded character (U+00A0) needs to be replaced with a regular space (U+0020).

If jsondecode.com saved you time, share it with your team

Free forever. No ads. No sign-up. Help other developers find it.