HTML

HTML Decode

Details

How to use HTML Decode

What the tool does, how to run it, and what to expect from the result.

How to decode HTML entities to plain text

Entity decoding turns <div> back into a real angle-bracketed tag and & back into an ampersand. It is what you need when you are reading escaped content out of a database column, an API response, a log line, or a scraped page and you want the original text.

Everything runs in your browser. Bear in mind that decoding is the operation that removes safety, so the result should be treated as untrusted and escaped again before it goes anywhere near a live page.

  • Paste the text containing HTML entities into the input box.
  • Read the decoded plain text from the output panel.
  • If the output still contains entities, the content was double-escaped, so run the result through again.
  • Do not inject the decoded text into a page with innerHTML, because it can now contain live markup.
  • For content that uses the full range of named entities such as © or —, use a proper HTML parser instead.
Tips

Getting a better result out of HTML Decode

Specific settings and thresholds, not general advice.

  • This decodes the common entities, not all 2,000-plus named ones. It handles < > " ' ' '   and &. Entities such as ©, é, —, and … are left as literal text, so if your input is full of those you will need a full HTML parser.
  • The ampersand entity is decoded last, which is what makes nested entities come out correctly. An input of < is the escaped form of the text <, and decoding once should give you < rather than a less-than sign. Decoding it again would be wrong.
  • Decoded output is unsafe by definition. You are turning <script> back into a real script tag, so never take decoded text and inject it into a page with innerHTML. If the goal is to display it, keep it escaped.
  • Seeing entity codes rendered as visible text on a live page means the content was double-escaped upstream, not that it needs decoding here. Fix the pipeline that escaped it twice rather than patching the symptom.
  • The non-breaking space entity is converted to an ordinary space here. If you need the actual U+00A0 character, for example to preserve alignment, copy it from elsewhere, because a regular space will wrap where a non-breaking space would not.
Limits

What HTML Decode does not do

The honest boundary, so you do not lose time finding it yourself.

  • It supports only the common entity set. The full HTML5 named character reference table has more than 2,000 entries and this covers a small subset of it.
  • It does not decode arbitrary numeric references, so sequences such as — or — are left alone.
  • It converts   to an ordinary space rather than to the non-breaking space character U+00A0.
  • It does not parse HTML. It decodes entities in whatever text you give it, so tags in the input are left as text rather than interpreted.
Reference

Terms used on this page

Short, plain-language definitions for the formats and settings above.

At a glance

Who HTML Decode is for

A quick way to understand who this helps, what it solves, and where it connects next.

Best fit

Developers, engineers, and anyone working with encoded data.

Ideal for

Quick encoding, decoding, and inspection without a backend or install.

FAQ

Common questions

Short answers for the questions people usually have before trying a utility like this.

Is the HTML decoder free?

Yes. It is completely free to use, with no signup, no account, and no paywall.

Do I need to install anything?

No. It runs in any modern browser on desktop or mobile, with nothing to download and nothing to configure.

Does it stay local?

Yes. The text you paste is processed entirely in your browser and never uploaded to a server.

My entity was not decoded. Why?

This tool covers the small set of entities that matter for escaping (the angle brackets, the quotes, the ampersand, and the non-breaking space) rather than the full HTML5 table of more than 2,000 named references. Entities for typographic and symbol characters, such as ©, —, …, and the accented-letter names, are outside that set and are passed through unchanged. Content that is heavy with those needs a full HTML parser rather than a substitution pass.

Is it safe to put decoded HTML back on a page?

Not without escaping it again. Decoding is the exact inverse of the operation that made the text safe, so a decoded string can contain a real script tag, a real event handler, or a real closing tag that breaks out of its element. Decoded output is for reading and for feeding into a non-HTML destination. If it goes back into a page, escape it again first.

Why do I see < in my data?

That is double escaping: the text was escaped once, producing <, and then escaped again, turning the ampersand into &. It usually means two layers of your stack both escaped the same value, for example a template engine that escapes by default sitting on top of code that escaped by hand. Decoding once here gives you back <, which is the correct single-escaped form. The real fix is to remove one of the two escaping steps.

Why does   come out as a normal space?

The tool substitutes it with an ordinary space character, which is what you usually want when you are extracting readable text from scraped HTML, because a stray U+00A0 breaks string comparisons and trims in surprising ways. If your goal is to preserve the exact character, for instance because it is holding a line together, you will need to reinsert it, since a normal space will allow a line break where a non-breaking space would not.

Does the decoding happen locally?

Yes. It is a set of string replacements running in your browser, and nothing you paste is transmitted or retained.

Recommendations

You Might Also Like

Nearby tools from the catalog that fit the same job or workflow.

Cleanor app

Do it all on your device

Cleanor puts these tools in one app: compress and convert images, video, and audio, work with PDFs, and scan text right on your device. Plus free up storage and clear inbox clutter with Email Cleaner. Start with a free trial.

  • iPhone
  • Android
  • Macsoon
  • Windowssoon