Skip to content

HTML Decoder

Decoded text —
References decoded
—
Named entities
—
Numeric references
—
Left unchanged
—
Characters removed
—

Paste text full of HTML entities and the decoder replaces each character reference with the character it stands for. For example, <p>Fish & Chips</p> becomes a real paragraph tag around Fish & Chips, with five references decoded. Named, decimal and hexadecimal forms are all handled, and anything unrecognised is left exactly as it was.

About this tool

Escaped text turns up in database dumps, RSS feeds, JSON from a CMS and emails that were encoded twice: a title reads Café instead of Café, or a code sample shows <div> where you wanted the tag. This decoder converts those character references back into real characters. It reads named entities such as © and —, decimal references like — and hex references like —, then lists each distinct reference with its character, code point and how often it appeared. The named table covers about 170 of the most used entities rather than all 2,231 in the HTML standard, so a rare name such as &bigtriangleup; stays untouched and is counted as left unchanged.

How to use it

  1. Paste the encoded text

    Put the escaped HTML in the box, or open a .txt or .html file from your device.

  2. Read the decoded output

    The decoded text appears as you type, ready to copy.

  3. Check the reference table

    Each distinct entity is listed with its character, Unicode code point and count, so you can see what changed.

  4. Review anything left unchanged

    A warning counts ampersand sequences that were not recognised, such as a missing semicolon.

Examples

Escaped paragraph tag

Encoded HTML
<p>Fish & Chips</p>

Result Decoded text: <p>Fish & Chips</p>
References decoded: 5
Named entities: 5
Numeric references: 0
Left unchanged: 0
Characters removed: 16

  1. Found 5 named reference(s) such as & and 0 numeric reference(s) such as © or ©.
  2. Each reference was replaced by the character at its Unicode code point; invalid code points become U+FFFD.
  3. The decoded text is 16 code units shorter than the input.

A snippet copied from page source, where the tags and the ampersand were escaped, turns back into readable markup.

Decimal and hex references

Encoded HTML
© 2024 €5

Result Decoded text: © 2024 €5
References decoded: 2
Named entities: 0
Numeric references: 2
Left unchanged: 0
Characters removed: 12

  1. Found 0 named reference(s) such as & and 2 numeric reference(s) such as © or ©.
  2. Each reference was replaced by the character at its Unicode code point; invalid code points become U+FFFD.
  3. The decoded text is 12 code units shorter than the input.

© is decimal for the copyright sign and € is hexadecimal for the euro sign.

Accents and an em dash

Encoded HTML
Café — naïve

Result Decoded text: Café — naïve
References decoded: 3
Named entities: 3
Numeric references: 0
Left unchanged: 0
Characters removed: 18

  1. Found 3 named reference(s) such as & and 0 numeric reference(s) such as © or ©.
  2. Each reference was replaced by the character at its Unicode code point; invalid code points become U+FFFD.
  3. The decoded text is 18 code units shorter than the input.

Older CMS exports often store accented letters as entities; decoding restores the plain characters.

How it is calculated

&name; → character from the named table; &#d; → code point d; &#xh; → code point h (base 16)

name
an entity name such as amp, lt or eacute, matched case-sensitively
d
a decimal code point, e.g. 233 for é
h
a hexadecimal code point, e.g. E9 for é

The text is scanned once for an ampersand followed by a name or a hash and digits. Numeric references are converted straight to the Unicode character at that code point; zero, surrogates and values above U+10FFFF become the replacement character U+FFFD, as the HTML parser does. Named references need their closing semicolon and must appear in the built-in table, otherwise they are kept verbatim. Because one pass is made, double-encoded input like &lt; decodes to < and needs a second run.

When not to use it

  • To strip tags or render a page, since this only converts entities and leaves markup as text.
  • For percent-encoded URLs such as %20, which need a URL decoder instead.
  • When the text uses rare entity names outside the common set, which are left unchanged.

Common mistakes

  • Expecting double-encoded text like &amp;lt; to decode fully in one pass.
  • Writing entity names in the wrong case, since É and é are different letters.
  • Dropping the trailing semicolon, which makes a named entity unrecognised here.

Frequently asked questions

What is the difference between named and numeric entities?

A named entity uses a mnemonic such as ©, while a numeric reference gives the Unicode code point directly, either in decimal (©) or in hexadecimal (©). All three produce the same copyright sign.

Why is my text still showing < after decoding?

It was probably encoded twice, so the source held &lt;. One pass turns & into an ampersand and leaves <. Paste the output back in and it decodes to the less-than sign.

What happens to an invalid numeric reference?

References to code point zero, to the surrogate range D800 to DFFF, or above 10FFFF are replaced with U+FFFD, the replacement character, which matches how browsers treat them.

Does AT&T get changed?

No. An ampersand that is not followed by a recognised name and a semicolon is kept as it is, and the stats count it under left unchanged so you can check it.

Is the non-breaking space decoded?

Yes.   becomes U+00A0, which looks like a normal space but does not allow a line break. The table labels it so it is not mistaken for an ordinary space.

Is my text uploaded?

No. Decoding runs in your browser, and a file you open is read locally rather than sent to a server.

Cite this tool

Using this tool in an assignment, article or report? Copy a citation, or a link for your website.

APA

Tools Directory Editorial Team. (2026, October 12). HTML Decoder. Tools Directory. Retrieved October 26, 2026, from https://tools.milunir.com/converters/text-encoding/html-decoder/

MLA

Tools Directory Editorial Team. “HTML Decoder.” Tools Directory, 12 Oct. 2026, https://tools.milunir.com/converters/text-encoding/html-decoder/. Accessed 26 Oct. 2026.

Chicago

Tools Directory Editorial Team. “HTML Decoder.” Tools Directory. Last modified October 12, 2026. Accessed October 26, 2026. https://tools.milunir.com/converters/text-encoding/html-decoder/.

Link<a href="https://tools.milunir.com/converters/text-encoding/html-decoder/">HTML Decoder – Tools Directory</a>