How to decode HTML entities into text

HTML entity decoding replaces character references such as & and © with their text characters, without needing to render the input as HTML.

Open the HTML Entity Decoder

What an HTML entity decoder handles

HTML supports named references such as &, decimal numeric references such as ©, and hexadecimal references such as ©. All three can represent characters in text.

& → &
&lt; → <
&#169; → ©

Decoding is not the same as stripping HTML. A decoded less-than sign may restore markup syntax, so the result must be handled according to its destination.

How to decode an HTML entity

  1. Copy the encoded text, not the surrounding page markup unless it is part of the value.
  2. Paste it into the decoder.
  3. Select Decode entities.
  4. Review the plain-text result, especially restored angle brackets and ampersands.
  5. Copy the result only into a context that treats it safely.

The ToolPixels decoder uses HTML text-context rules and decodes once. An unrecognized name remains unchanged.

Why decoding once matters

For doubly encoded text, &amp;amp; becomes &amp; after one pass. A second pass would produce &. Repeated decoding can transform data farther than intended and may restore active-looking markup.

Decode only the layer you understand. If the source passed through several systems, identify where each layer of escaping was introduced before removing it.

Named and numeric references

InputTypeOutput
&quot;Named"
&#38;Decimal&
&#x3C;Hexadecimal<

Browser-style correction rules apply to some invalid numeric references, while unknown named references remain visible for review.

Decode safely

  • Keep output as text when inspecting untrusted values.
  • Do not insert decoded content with innerHTML unless it has been sanitized for that exact context.
  • Do not confuse entity decoding with URL decoding or Base64 decoding.
  • Check whether an ampersand belongs to normal prose before assuming it begins a reference.

Use HTML Entity Decoder in your browser

Decode named and numeric HTML character references once, locally, and inspect the result as plain text.

Decode HTML entities