HTML Decoder Online - Free, No Sign-Up Tool

HTML Decoder

Decode HTML entities back to their original characters.

Use this HTML decoder online to turn encoded HTML entities back into readable characters. Paste your code or upload an HTML or TXT file, click Decode, and entities such as &amp; and &lt; become & and <. It helps developers, editors and SEOs clean up exported, scraped or escaped text.

What Is HTML Decoding?

HTML decoding is the process of converting HTML entities back into the characters they stand for. An entity is a short code that starts with an ampersand and ends with a semicolon. Browsers use entities to show characters that would otherwise be read as markup, or that are hard to type on a keyboard.

Entities come in three common forms. Named entities use a word, such as &copy; for the copyright sign. Decimal numeric entities use a code point number, such as &#169;. Hexadecimal numeric entities add an x, such as &#xA9;. All three produce the same character.

Five characters need special care in HTML: the ampersand, the less-than sign, the greater-than sign, the double quote and the apostrophe. A raw less-than sign in a paragraph makes the browser think a tag is starting. Writing it as &lt; tells the browser to display the symbol instead. Decoding reverses that step and gives you the original character.

EntityDecodes toMeaning
&amp;&Ampersand
&lt;<Less-than sign
&gt;>Greater-than sign
&quot;"Double quote
&#39;'Apostrophe
&copy;©Copyright sign

How to Use the HTML Decoder

You can decode text in four quick steps: add your input, click Decode, review the result, then copy or download it.

  1. Paste your encoded text into the box labeled HTML Code to Decode. The placeholder reads "Enter your HTML code to decode...".
  2. Or click Browse File and choose an .html, .htm or .txt file. The label next to the button changes from "No file selected" to your file name. When a file is selected, the tool decodes that file instead of the text box.
  3. Click Decode.
  4. Read the output in the read-only Decoded Result box, then select and copy it.
  5. To save it, type a name in the field after "as:" (it starts as HtmlDecoded.txt) and click Download Decoded File.

What Does a Decoded Result Look Like? A Worked Example

A decoded result replaces every recognized entity with its character and leaves everything else untouched. Say you export a product description from a database and get this:

&lt;p&gt;Tom &amp;amp; Jerry&#39;s &quot;Best&quot; Caf&eacute;&lt;/p&gt;

After one click on Decode, the Decoded Result box shows:

<p>Tom &amp; Jerry's "Best" Café</p>

Notice what happened. The tag symbols are real again, the quotes and apostrophe are normal, and the accented e is readable. But the ampersand between Tom and Jerry still shows as &amp;. That is not a bug. The original text was encoded twice, so one pass removes only the outer layer.

To finish the job, copy the result, paste it back into the input box and click Decode again. The second pass turns &amp; into a plain ampersand. Always check for leftover entity codes before you trust the output.

How Do You Read and Act on the Results?

A good result contains readable characters and no leftover codes beginning with an ampersand and ending with a semicolon. Scan the output for these patterns and fix each one.

Entity codes are still visible

If you still see &amp;, &lt; or &#8217;, the source was encoded more than once. Run the output through Decode again until no codes remain. Stop as soon as the text looks right, because extra passes can change text that was meant to show an entity literally, such as a tutorial that explains HTML.

Odd symbols or question marks appear

Characters like é or a diamond with a question mark usually mean the file was saved in a different character encoding than the one it is read in. Entity decoding does not repair this. Re-save the source as UTF-8 and try again.

A code was left as it is

An entity with a typo, such as a misspelled name or a missing semicolon, may not be recognized. Find the code in the output and correct it by hand in the source, then decode again.

The output is one long line of markup

Decoded markup often arrives with no line breaks. Paste it into an HTML formatter to indent it so you can read and edit it.

Who Needs to Decode HTML Entities?

Anyone who handles text that passed through a system that escaped it will meet entities sooner or later. These are the most common situations.

  • Content migrations: CMS exports, database dumps and CSV files often store titles and body text with entities, such as &#8217; in place of a curly apostrophe.
  • SEO audits: Crawl exports and scraped title tags or meta descriptions can show &amp; where a plain ampersand belongs. Decoding gives you the text searchers actually see.
  • Feeds and APIs: RSS items and JSON responses frequently carry escaped HTML that you need to read before reusing.
  • Debugging: If you decode in your own code with JavaScript, Python or C#, use this page to check the output you should expect from a sample string.
  • Email and template cleanup: Escaped snippets copied from logs or editors become usable markup again.

Need the opposite direction? The HTML encoder converts special characters into entities so they display safely on a page. If you want text with no tags at all, strip HTML tags after decoding.

Best Practices and Common Mistakes

The safest workflow is to decode a copy, review it, and keep the original untouched. A few habits prevent most problems.

  • Test a small sample first. Decode a paragraph before you process a whole export, so you can see whether the text is single or double encoded.
  • Do not decode text that will go straight into a web page. Decoded output can contain live tags, including script tags. Displaying it unescaped in a page can break the layout or create a security hole. Encode it again, or sanitize it, before publishing.
  • Match the tool to the problem. If your string is full of percent signs like %20, it is URL-encoded, not entity-encoded. If it is a long run of letters and numbers ending in equals signs, try a Base64 decoder instead.
  • Use UTF-8 files. When you upload a file, save it as UTF-8 first to keep accented letters and symbols correct.
  • Name your download. Change the file name in the field after "as:" so you do not overwrite an earlier result called HtmlDecoded.txt.

If you are moving content into a docs system, decode first and then run the cleaned markup through an HTML to Markdown converter. Decoding first stops stray entities from ending up inside your Markdown files.

What Are the Limits of This Tool?

This tool converts HTML entities into characters and does nothing else. It does not validate your markup, fix broken tags, remove tags, repair character encoding, or decode percent-encoded URLs and Base64 strings. It also cannot tell whether you wanted an entity displayed literally, so it decodes what it recognizes.

The upload option accepts .html, .htm and .txt files. For other formats, copy the text and paste it into the input box. For more browser-based helpers for markup, code and encoding, browse the full web developer tools collection.

Decoding entities takes seconds and saves you from hand-editing hundreds of codes. Paste your text or choose a file above, click Decode, check the Decoded Result for leftovers, and download it when it looks right.

Frequently Asked Questions

What is an HTML decoder used for?
An HTML decoder converts entity codes such as the ampersand, less-than and quote entities back into the characters they represent. Use it on exported, scraped or escaped text, like database dumps and feed content, so you can read and edit the original wording.
How do I decode HTML entities with this tool?
Paste your text into the HTML Code to Decode box and click Decode. The converted text appears in the Decoded Result box. Copy it from there, or use Download Decoded File to save it under the name you type after the as label.
Can I decode an HTML file instead of pasting text?
Yes. Click Browse File and pick an .html, .htm or .txt file. When a file is selected, the tool decodes that file rather than the text box. The default download name is HtmlDecoded.txt, and you can change it.
Why does my decoded text still show entity codes?
Your text was probably encoded twice. One pass removes only the outer layer, so a code like ampersand amp semicolon can remain. Copy the result back into the input box and click Decode again until the codes are gone.
How do I decode HTML entities in JavaScript or Python?
Each language has its own method. Python offers html.unescape, and JavaScript code often uses the DOMParser interface. Paste a sample string into this decoder to see the expected output, then compare it with what your own code returns.
Is this HTML decoder free, and is decoded output safe to publish?
The HTML decoder is free and needs no sign-in. Decoded output can contain live tags, including script tags, so do not insert it into a web page as is. Encode it again or sanitize it before publishing.
Recommended

Explore VPN options

A VPN changes your network exit. It does not guarantee anonymity.

Hide Your IP Encryption Network coverage
Protect My IP Now