Skip to content
ToolPlankDEV
Encoders & Decoders
100% In-Browser Execution

Updated:

HTML Decoder Online

Paste text full of &, " or ' and this HTML decoder turns every entity back into the character it stands for. It knows the full HTML5 list of named entities, numeric codes and the no-semicolon forms browsers accept. Nothing is uploaded.

Options:

Text with HTML entities

Input
0 chars · 0 lines

Decoded text

Ready
Processing in browser...
0 chars · 0 linesUpdates as you type

Entities left as written

Names that are not valid HTML entities are listed here and left unchanged.

Processed on your device. Your text is not sent to our servers.

More free tools you may need next.

Quick Guide

How to use HTML Decoder

Simple step-by-step instructions to get the exact output you need.

  1. 01

    Paste the text with entities

    Paste anything that contains codes such as &, ", ' or é. It can be a whole page of HTML source, a feed title, a database field or a single line.

  2. 02

    Check the options

    The defaults match what a browser does. Tick Decode repeatedly when you see & or <, which means the text was encoded twice. Tick Require the semicolon to leave sloppy forms such as &copy alone.

  3. 03

    Copy the decoded text

    The readable text appears on the right as you type, with a count of what was decoded. Names the tool does not recognise are listed under the result and left as written. Press Copy, or press the swap button to encode the text again with HTML Encoder.

What an HTML decoder does

An HTML decoder turns character references, usually called entities, back into the characters they stand for. & becomes an ampersand, < becomes a less-than sign, é becomes é and 😀 becomes 😀. The reverse job is HTML Encoder.

HTML needs entities because a few characters have a job in the markup. A less-than sign opens a tag and an ampersand starts an entity, so a page that wants to show those characters writes them as codes. Entities are also a way to write characters that are hard to type, such as the euro sign or a non-breaking space.

You meet encoded text outside the browser too. Feeds, API responses, database exports, scraped page titles and email templates often carry entities as plain text, and a reader who sees Tom & Jerry's wants Tom & Jerry's.

A worked example

Text as it might arrive from a feed:

Text
Café & crème — © 2026 😀
<a href="/menu?a=1&b=2">Menu</a>
Price: 5 €  (€5) &unknown; &copy 2026

After one pass of the decoder:

Text
Café & crème — © 2026 😀
<a href="/menu?a=1&amp;b=2">Menu</a>
Price: 5 €  (€5) &unknown; © 2026

Named entities, decimal codes, hex codes and an emoji all came back as characters. &copy without a semicolon was accepted, as a browser would accept it. &unknown; is not an HTML entity, so it stays as written and shows up in the list under the result.

The link in the second line still contains &amp; because it was encoded twice. That is what the next section is about.

Decode HTML entities that were encoded twice

Double encoding happens when text is escaped, stored, then escaped again by another system. The ampersand of &lt; becomes &amp;lt;, and one round of decoding only gets you back to &lt;.

Tick Decode repeatedly and the tool runs again until nothing changes, up to 10 passes, and tells you how many it needed. Run on the example above, the link line becomes <a href="/menu?a=1&b=2">Menu</a>.

The options explained

  • Decode repeatedly runs the decoder until the text stops changing. It is the fix for double encoding.
  • Require the semicolon decodes only complete entities. Off, the tool follows the HTML5 rules for text: numeric codes without a semicolon and 106 legacy names such as &amp, &lt and &copy are accepted.
  • Turn non-breaking spaces into spaces replaces the character that &nbsp; produces (U+00A0) with a normal space. It looks the same on screen but behaves differently in searches, spreadsheets and code, so you may want it gone.

Longer names are matched exactly. &notin; is the not-an-element-of sign, but &notit; is not an entity, so the legacy rule reads it as &not followed by the text it; and gives ¬it;. Browsers do the same.

Numeric references and odd values

A numeric reference is a Unicode code point written in decimal (&#169;) or hex (&#xA9;). Both give ©, and an emoji outside the basic range works the same way.

The HTML5 spec has special cases and the tool follows them. Code 0, a value above U+10FFFF and the surrogate range D800 to DFFF decode to the replacement character �. Codes 128 to 159 are read as Windows-1252 characters, so &#150; is an en dash and &#128; is a euro sign, which is how old pages were written.

HTML decode versus URL decode

They solve different problems. HTML entities start with an ampersand, as in &amp;. URL percent-encoding starts with a percent sign, as in %26. If you see %20 or %3D, use URL Decode. If you see \n or \u00e9 inside quotes, that is JSON Unescape.

Want the text without any tags as well? Remove HTML Tags strips the markup and decodes the common entities in one step, but it is not a full decoder. This page knows every named entity in the HTML5 list.

HTML unescape in code

When the job is part of a program, use the platform's own function. In Python:

Python
import html
html.unescape("Caf&eacute; &amp; cr&egrave;me")

In JavaScript running in a browser, parse the string and read its text. Never put untrusted text into the live page to do this.

JavaScript
const doc = new DOMParser().parseFromString(input, "text/html");
const text = doc.documentElement.textContent;

PHP has html_entity_decode() and Java developers usually reach for a library such as Apache Commons Text. Use this page to check what the correct answer should be for a tricky string.

Limits and safe use

  • The decoded result is shown as plain text and is never rendered as HTML, so pasted markup cannot run.
  • Decoding does not clean text. If the result still contains tags, they are real tags now.
  • Entities that are not in the HTML5 list are left as written. A misspelled name such as &eacue; is reported, not guessed.
  • Very large pastes work, but the page can slow down because browsers are slow at laying out huge text boxes.

Decoding happens in your browser. What you paste is not uploaded or stored. See the Privacy Policy for details.

Frequently Asked Questions

Technical Q&A for HTML Decoder

Common questions about edge cases, character encoding, and privacy guarantees.

Paste the text into the left box. The decoded text appears on the right as you type, ready to copy. Named entities, decimal codes and hex codes are all handled.

Paste text containing &amp; and the tool shows an ampersand. If you still see &amp; afterwards, the text was encoded twice, so tick Decode repeatedly.

The text was HTML-encoded twice. The first round turned & into &amp;, and the second turned that ampersand into &amp;amp;. Decode repeatedly runs the decoder until the text stops changing.

There is none in practice. Both mean turning entities such as &lt; and &#169; back into characters. Python calls it html.unescape and PHP calls it html_entity_decode.

Yes. It includes the full HTML5 list of 2,125 names that end in a semicolon, plus the 106 legacy names a browser accepts without one. Names outside that list are left as written and shown under the result.

Yes. It produces a non-breaking space, the character U+00A0. Tick Turn non-breaking spaces into spaces if you want a normal space instead.

Yes. &#39; and &#x27; both give an apostrophe. Codes without a semicolon are also accepted unless you tick Require the semicolon.

In Python use html.unescape(text). In a browser, parse the string with DOMParser and read textContent. Both are shown in the article above.

Yes. The text is shown as plain text and never rendered as HTML, so scripts in it cannot run. Nothing is sent to a server.

Use the HTML Encoder, which is one click away with the swap button. It escapes &, <, > and quotes, and can encode accents and symbols too.