{ ILoveJS }

HTML Decoder

Decode HTML entities back to their original characters.

htmldecodeentitiesunescape

What is HTML Decoder?

The HTML Decoder tool converts HTML entities back into their original, human-readable characters. When HTML is encoded, special characters like <, >, &, and " are replaced with entity references such as &lt;, &gt;, &amp;, and &quot; to prevent browsers from misinterpreting them as markup. This tool reverses that process, giving you back clean, readable text in seconds.

For developers, this is an everyday necessity. Whether you're parsing API responses, inspecting database content, debugging template output, or working with scraped web data, HTML-encoded strings frequently appear where you least expect them. Instead of manually looking up entity codes or writing a one-off script, the HTML Decoder handles both named entities (&copy;, &nbsp;) and numeric references (&#169;, &#x00A9;) instantly and accurately.

How to Use

Using the tool is straightforward: paste your HTML-encoded string into the input field and the decoded output appears immediately. Input can range from a single entity like &amp; to entire blocks of HTML-encoded content containing dozens of mixed entity types. The tool handles both decimal numeric references (&#60;) and hexadecimal numeric references (&#x3C;) alongside all standard named HTML entities defined in the HTML5 specification.

The output is plain, unescaped text with all entities resolved to their Unicode equivalents. For example, input like &lt;p&gt;Hello &amp; welcome &#8212; enjoy!&lt;/p&gt; will produce <p>Hello & welcome — enjoy!</p>. This makes it easy to visually inspect content, copy it into documents, or use it in further processing steps.

One edge case to be aware of: if your input contains entities that are doubly encoded (e.g., &amp;lt; representing a literal &lt;), the tool will only decode one layer at a time. Run the output through the decoder a second time if you need to unwrap multiple encoding layers. Also note that decoding does not sanitize or validate HTML structure — it purely resolves entity references.

Use Cases

Debugging API responses: REST and GraphQL APIs sometimes return HTML-encoded strings in JSON payloads — use the decoder to read the actual content without writing throwaway code.
Database content inspection: CMS platforms like WordPress often store post content with encoded entities; pasting a raw database value into the decoder instantly reveals the readable text.
Web scraping cleanup: Scraped HTML frequently contains encoded characters in titles, descriptions, and body text — decoding the output gives you clean strings ready for storage or display.
Email template debugging: HTML email bodies are often encoded for safe transport; decoding them lets you verify the actual rendered text without spinning up a mail client.

Related Tools