Developer guide
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.
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.
& → &< → <© → ©
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
- Copy the encoded text, not the surrounding page markup unless it is part of the value.
- Paste it into the decoder.
- Select Decode entities.
- Review the plain-text result, especially restored angle brackets and ampersands.
- 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; becomes & 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
| Input | Type | Output |
|---|---|---|
" | Named | " |
& | Decimal | & |
< | 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
innerHTMLunless 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.