Skip to main content
59 tools

HTML Decode - Decode HTML Entities Online Free

Decode HTML entities and character codes back to readable text. Free, no signup required.

Try the Tool
100% Free No Sign-up Instant Results Privacy First
Web Tool
About This Tool

What Is HTML Decoding?

HTML decoding is the process of converting HTML entity references back into their original characters. When text is stored or displayed in HTML, certain characters must be replaced with special codes called entities to prevent the browser from misinterpreting them as HTML markup. HTML decoding reverses that conversion, restoring the original readable text.

For example, the less-than sign (<) is encoded as &lt; because < has special meaning as the opening of an HTML tag. The ampersand (&) is encoded as &amp; because it marks the beginning of an entity reference. Without encoding, the browser would try to parse these characters as markup, producing broken pages or rendering errors. HTML decoding converts these codes back to their original characters so you can read and work with the actual text.

This tool performs HTML decoding using PHP's native html_entity_decode() function on the server, ensuring accurate handling of all entity types without browser-specific inconsistencies. Paste any text containing HTML entities into the input area, click Decode, and get the clean, readable result instantly.

Types of HTML Entities

HTML entities come in three forms, all of which this tool decodes:

  • Named entities — Use human-readable names that correspond to specific characters. Common examples include &amp; (ampersand &), &lt; (less-than <), &gt; (greater-than >), and &quot; (double quote ").
  • Decimal numeric entities — Use a decimal number following &# to represent a character by its Unicode code point. For example, &#60; decodes to < and &#169; decodes to ©.
  • Hexadecimal numeric entities — Use a hexadecimal number following &#x. For example, &#x3C; decodes to < and &#x26; decodes to &.

All three forms produce the same character when decoded. A less-than sign can appear as &lt;, &#60;, or &#x3C; — they all decode to the same < character.

Common HTML Entities You Will Encounter

These are the most frequently encoded characters in HTML content:

  • &amp; — Ampersand (&). The most common entity because the ampersand itself starts every entity reference.
  • &lt; — Less-than sign (<). Encoded to prevent the browser from treating it as the start of a tag.
  • &gt; — Greater-than sign (>). Encoded to avoid confusion with closing tag brackets.
  • &quot; — Double quotation mark ("). Used inside HTML attributes enclosed in double quotes.
  • &apos; or &#39; — Single quote / apostrophe ('). Often encoded inside attributes using single-quoted values.
  • &nbsp; — Non-breaking space. A special whitespace character that prevents line wrapping in HTML.
  • &copy; — Copyright symbol (©). One of many named character references for special symbols.
  • &trade; — Trademark symbol (™). Used in brand-related content.
  • &mdash; — Em dash (—). A long dash commonly used in written prose.
  • &hellip; — Ellipsis (…). Three dots indicating omission.

The HTML specification defines over 2,000 named character references. This tool handles all of them, including decimal and hexadecimal numeric forms.

When Should You Decode HTML Entities?

HTML decoding is useful in several common scenarios:

  • Clean imported data — When you import content from a CMS, database export, or XML/JSON feed, the text may contain HTML entities that need to be decoded before you can use it as plain text or re-encode it for a different system.
  • Read email content — Email clients and servers frequently encode special characters in email bodies and headers. Decoding reveals the actual message content.
  • Inspect scraped content — Websites that output content with entities (common for multilingual sites) produce encoded text when scraped. Decoding makes the text readable and searchable.
  • Debug HTML output — When your application double-encodes characters (showing &amp;lt; instead of &lt;), decoding the output reveals what the final rendered text will look like.
  • Security analysis — Entity encoding is sometimes used to obfuscate malicious payloads in form submissions or URL parameters. Decoding helps security analysts inspect the actual content.
  • Data cleaning and migration — Moving content between systems often introduces encoding inconsistencies. Decoding normalizes the text to its original form.

HTML Encoding vs URL Encoding

These two encoding schemes serve completely different purposes and are often confused:

  • HTML encoding uses ampersand-based entities like &lt; and &amp;. It is used inside HTML documents to safely display special characters without the browser interpreting them as markup.
  • URL encoding (percent-encoding) uses percent signs and hexadecimal digits like %20 and %26. It is used in URLs to transmit characters that are unsafe or reserved in the URL syntax.

For example, an ampersand in HTML becomes &amp;, but in a URL it becomes %26. They look nothing alike and serve different contexts. Use our HTML Encode tool for HTML encoding and our URL Decode tool for URL decoding. Never mix the two.

How HTML Entities Are Generated

Understanding how entities get into your text helps you know when decoding is necessary:

  • Content Management Systems — WordPress, Drupal, Joomla, and other CMS platforms store content with entities to ensure safe HTML output. When exported, this encoded content often needs decoding.
  • PHP htmlspecialchars() — The PHP function htmlspecialchars() converts special characters to HTML entities. Its counterpart, html_entity_decode(), reverses the process.
  • Database storage — Some databases store text with entities to prevent SQL issues with special characters, requiring decoding when retrieved.
  • API responses — REST and GraphQL APIs may return content with entities in JSON or XML payloads, especially for multilingual content.
  • Email clients — MIME-encoded emails frequently contain entity-encoded content in both the body and headers.

How to Use This Tool

  1. Paste your encoded text — Enter any text containing HTML entities into the input area. This works with named, decimal, and hexadecimal entities in any combination.
  2. Click Decode — The tool converts all HTML entities back to their original characters using PHP's html_entity_decode() function.
  3. Copy or Download — Use the Copy button to copy the decoded text to your clipboard, or click Download as TXT to save it as a file.

Need to encode text instead? Our HTML Encode tool converts plain text into HTML-encoded form. For URL-specific encoding, try our URL Decode tool.

Characters That Do Not Need HTML Encoding

In HTML, most characters do not need to be encoded. Only a few specific characters require entities:

  • Ampersand (&) — Must be encoded as &amp; because it starts every entity reference.
  • Less-than (<) — Must be encoded as &lt; because it starts HTML tags.
  • Greater-than (>) — Typically encoded as &gt; for consistency and safety.
  • Double quote (") — Encoded as &quot; when inside HTML attributes that use double quotes.
  • Single quote (') — Encoded as &apos; or &#39; when inside single-quoted attributes.

Letters, numbers, and most symbols can appear literally in HTML without encoding. Entities are only needed for the five characters listed above and for special symbols like ©, ™, or — that have no standard keyboard representation.

  • HTML Encode — Convert plain text into HTML-encoded form with named or numeric entities.
  • URL Decode — Reverse percent-encoded URLs back to readable text.
  • JSON Formatter — Format, validate, and beautify JSON data for debugging and documentation.

Privacy and Security

HTML decoding is performed entirely on our servers using PHP's native html_entity_decode() function. We do not store your input or decoded output. The tool processes your data in memory and discards it immediately after returning the result. No cookies, tracking scripts, or analytics collect your decoded text.

HTML entity decoding is distinct from URL decoding (percent-encoding) and Base64 decoding. URL encoding uses percent signs and hexadecimal digits for safe transmission in URLs, while HTML encoding uses ampersand-based entity syntax for safe display in HTML. Never confuse the two, as decoding one format with the wrong decoder will produce garbage output.

AI Overview

HTML entity decoding is the process of converting HTML entity references back into their corresponding characters. HTML entities are special codes used to display reserved characters in HTML without the browser interpreting them as markup. For example, the less-than sign is encoded as &amp;lt; because &lt; has special meaning as the start of an HTML tag. When decoded, &amp;lt; becomes &lt; and &amp;amp;amp; becomes &amp;. There are three forms of entities: named (like &amp;amp;amp;, &amp;lt;, &amp;gt;), decimal numeric (like &amp;#60;), and hexadecimal numeric (like &amp;#x3C;). All three forms produce the same character when decoded.

Quick Answers

Q:

What is HTML entity decoding?

A:

HTML entity decoding converts entity codes like &amp;amp;amp;, &amp;lt;, and &amp;#60; back into their original characters (&amp;, &lt;, and &lt; respectively). It reverses the encoding that special characters undergo when stored or displayed in HTML.

Q:

Is this HTML decoder free?

A:

Yes. The decoder is 100% free with no registration, no limits, and no hidden fees.

Q:

What types of HTML entities does it support?

A:

It supports named entities (&amp;amp;, &amp;lt;, &amp;gt;, &amp;quot;, etc.), decimal numeric entities (&amp;#60;), hexadecimal numeric entities (&amp;#x3C;), and non-breaking spaces (&amp;nbsp;).

Q:

How is this different from URL decoding?

A:

URL decoding converts percent-encoded sequences like %20 and %26 back to spaces and ampersands. HTML decoding converts entity codes like &amp;lt; and &amp;amp; back to their original characters. They use different syntax for different contexts.

How to Use the HTML Decode - Decode HTML Entities Online Free

  1. Enter any text containing HTML entities into the input textarea. This can be encoded markup from a CMS, email content, scraped data, or any text where special characters appear as entity codes instead of their actual symbols.
  2. The tool instantly decodes all named entities (like &amp;amp;, &amp;lt;, &amp;gt;) and numeric entities (like &amp;#60;, &amp;#38;) back into their original readable characters. The decoding happens server-side for maximum accuracy.
  3. Use the Copy button to copy the decoded text to your clipboard, or click Download as TXT to save the clean, readable text as a file for later use.

Benefits

  • 100% Free, No Registration
  • Instant Decoding
  • Supports All Entity Types
  • Safe Server-Side Processing
  • Works on Any Device
  • Copy and Download

Common Mistakes

  • Assuming all encoded text uses named entities &mdash; many systems use numeric entities like &amp;#169; instead of &amp;copy;
  • Double-decoding text that has already been decoded, which can corrupt legitimate ampersand characters
  • Confusing HTML entity encoding with URL encoding &mdash; they use completely different syntax and serve different purposes
  • Expecting HTML decode to fix malformed HTML markup &mdash; it only converts entities, not structural tags
  • Forgetting that some entities have multiple valid forms (e.g., &amp;nbsp; vs &amp;#160;) and decoded output may differ in form from the original

Professional Tips

  • Always decode before editing encoded text &mdash; make changes on the decoded version, then re-encode if needed for web output
  • When scraping websites, run the result through HTML decode to get clean, readable text before processing further
  • Check whether your database already stored encoded or decoded content before running a batch decode operation
  • For mixed content that contains both HTML tags and entities, the decode tool will only convert the entities while leaving tags intact
  • Use HTML decode to inspect suspicious email content that may contain hidden entity-encoded text

Common Use Cases

Web Developers

Decode HTML entities when debugging output, inspecting CMS-generated markup, or cleaning data imported from external sources.

Email Content Cleaning

Decode encoded email bodies and headers to read the actual message content when working with raw email data or forwarding logs.

Web Scrapers

Decode scraped content from websites that output HTML entities instead of raw characters, especially useful for multilingual data extraction.

Data Migration

Clean imported data that contains HTML entities from CMS exports, database dumps, or XML/JSON feeds from other systems.

SEO Professionals

Decode meta descriptions, title tags, and structured data that may be stored with HTML entities in content management systems.

Security Analysts

Inspect entity-encoded payloads in form submissions and URL parameters to detect potential XSS attacks or encoding-based obfuscation.

Related Concepts

HTML Entity Encoding

The process of replacing special characters with HTML entities (like &amp;lt; and &amp;gt;) so they can be safely displayed in HTML documents without being interpreted as markup.

Named Entities

Human-readable entity codes like &amp;amp;amp;, &amp;lt;, &amp;gt;, and &amp;quot; that map to specific characters. Defined in the HTML and XML specifications.

Numeric Entities

Entity codes that use decimal (&amp;#60;) or hexadecimal (&amp;#x3C;) numbers to represent characters by their Unicode code point.

URL Encoding (Percent-Encoding)

A different encoding scheme that uses percent signs and hex digits for URLs. Not the same as HTML entity encoding. See our <a href="/en/web-tools/url-decode">URL Decode</a> tool.

HTML Encode

The reverse operation of HTML decode. Converts plain text into HTML-encoded form. Use our <a href="/en/web-tools/html-encode">HTML Encode</a> tool for this.

htmlspecialchars()

A PHP function that converts special characters to HTML entities. The counterpart is html_entity_decode() which reverses the process.

Frequently Asked Questions

HTML entity decoding converts entity codes back to their original characters. Named entities like &amp;amp;amp; become &amp;, numeric entities like &amp;#60; become &lt;, and hexadecimal entities like &amp;#x3C; also become &lt;. The decoded text is the human-readable version of the original content.

You need HTML decoding when dealing with content from databases, CMS systems, email clients, or web scrapers that stored special characters as entities. Common scenarios include cleaning imported data, inspecting encoded email content, debugging HTML output, and preparing scraped text for analysis.

Named entities use human-readable names like &amp;amp;amp; for ampersand or &amp;lt; for less-than. Numeric entities use decimal codes like &amp;#38; or hexadecimal codes like &amp;#x26; to represent characters by their Unicode code points. Both decode to the same character.

HTML encoding uses entities like &amp;lt; and &amp;amp; for safe display in HTML documents. URL encoding uses percent signs like %3C and %26 for safe transmission in URLs. They serve different purposes and should not be mixed. Use our <a href="/en/web-tools/html-encode">HTML Encode</a> and <a href="/en/web-tools/url-decode">URL Decode</a> tools for each respective task.

No. HTML tag syntax like &lt;div&gt; is not an entity &mdash; it is standard HTML markup. This tool only decodes entities (ampersand-based codes) back to their characters. It will not alter HTML tags in your input.

Unescaping is a broader term that can apply to many escape sequences in different contexts (programming strings, SQL queries, shell commands). HTML decoding specifically handles HTML entity escapes. In the context of web content, they are essentially the same operation.

If the input contains no HTML entities, the decoded output will be identical to the input. The tool will not damage or alter text that does not contain entity codes. It only replaces entities it finds and leaves everything else untouched.

It depends on your use case. If you are displaying the decoded text in an HTML document, you should re-encode it (using our <a href="/en/web-tools/html-encode">HTML Encode</a> tool) to prevent special characters from being interpreted as markup. If you are using the text outside of HTML contexts, no re-encoding is needed.

References

Author

The ToolsConverters editorial team reviews and maintains all tool descriptions, how-to guides, and FAQ content to ensure accuracy and usefulness for everyday users.

Reviewed By

ToolsConverters Technical Reviewer

Technical review ensures that HTML entity encoding standards, PHP function behavior, and web development best practices described on this page are accurate and current.

Last Updated


Accuracy Statement

This page was last reviewed for accuracy in August 2026. HTML entity decoding behavior is based on PHP html_entity_decode() and the HTML5 specification. Features may be updated as the tool evolves.

Editorial Process

Tool descriptions and guides are written by the editorial team, reviewed for technical accuracy, and updated periodically to reflect changes in HTML encoding standards and web development practices.

Educational Purpose

This page is designed to help users understand what HTML entity encoding is, when and why decoding is needed, and how to use it correctly - whether they are developers, content editors, or everyday users.

Most Used Tools in Web Tools

Explore our complete collection of web tools.

More in This Hub

Cookie
We care about your data and would love to use cookies to improve your experience.