To unescape HTML, decode character references back into the characters they represent.
For example, copied content can contain & where a literal ampersand should appear, or < where a less-than sign should appear. Use the HTML Entity Encoder / Decoder in Decode references mode when the goal is to turn those references into readable plain text.
“Unescape” here means reversing character-reference encoding, not stripping tags or rewriting an HTML document. The decoder returns text; it does not render a new page or execute the result as markup.

What HTML Unescaping Changes
HTML character references let markup represent characters that have special meaning in a page. A named reference contains an ampersand and a name, while a numeric reference uses a decimal or hexadecimal number. During decoding, the browser resolves those forms and returns their corresponding characters. Thus © can become ©, while a numeric form can produce the same character in another notation.
Decode mode is more comprehensive than a small lookup table. It uses the browser’s current HTML parser, so it recognizes the current named-reference table, legacy aliases, decimal references, and hexadecimal references. Some named references map to more than one code point, and the handling of older parsing details follows the HTML behavior implemented by the browser in use.
Decoded content is not inserted into the visible page or executed as markup. It is placed in a plain, read-only text area. A decoded string can therefore contain characters that look like markup while remaining inert in the tool itself.
Decode HTML Entities in the Browser
- Choose Decode references. Encoding-mode choices apply only to encoding, so select the decoding direction before pasting text.
- Paste the source text. Begin with a small representative sample and keep the original nearby for comparison before processing a larger block.
- Select the conversion button. The browser resolves the pasted references using its current HTML parsing behavior.
- Inspect the plain-text result. Check ampersands, angle brackets, quotes, spacing, and any character that looked unexpected in the source. The output is shown as text rather than rendered as markup.
- Copy only into an appropriate context-aware workflow. If the destination should display markup-looking characters literally, apply the escaping required by that destination after checking what the decoded text contains.
The whole conversion happens in the browser. Input is not uploaded, the page does not save conversion history, and the tool does not fetch a remote reference table.
Reference Formats the Browser Resolves
The same decoded character may have named, decimal, or hexadecimal source forms:
| Reference type | Example input | Decoded result | Resolution rule |
|---|---|---|---|
| Named | © | © | Uses the browser’s current HTML named-reference table. |
| Decimal numeric | © | © | Interpreted directly as a numeric character reference. |
| Hexadecimal numeric | 😀 | 😀 | Uses hexadecimal digits to identify the code point. |
Named references are defined by the WHATWG HTML Living Standard’s named character reference table. Because the browser supplies the table, legacy names and aliases are available when that browser recognizes them. Numeric references are interpreted directly by the browser without relying on a named entry.
Decoding is therefore broader than the encoder’s basic table. If a character does not match the source expectation, test that reference alone before converting a larger document. The MDN character reference glossary explains the syntax and purpose of HTML character references.
Choose the Right Conversion Direction
The same tool handles the reverse operation. Select the mode according to the representation required by the receiving workflow:
| Mode | Output | Useful for | Main limitation |
|---|---|---|---|
| Decode references | Converts named, decimal, and hexadecimal references into characters. | Inspecting or recovering readable text. | The decoded output is not sanitized, and its destination context still matters. |
| Basic encoding | Converts ampersand, angle brackets, double quote, and apostrophe to fixed references. | Readable HTML source that protects syntax characters. | Ordinary Unicode remains directly readable. |
| Non-ASCII encoding | Adds uppercase hexadecimal references for code points above 126. | Legacy workflows, transport rules, teaching examples, or comparisons. | Usually unnecessary in modern UTF-8 HTML. |
In basic encoding, ampersand becomes &, less-than becomes <, greater-than becomes >, double quote becomes ", and apostrophe becomes '. Ampersand is encoded first, which prevents a newly created reference from being encoded a second time during the same operation. ASCII letters, numbers, spaces, tabs, and line breaks remain readable.
Non-ASCII mode keeps that syntax protection and also writes every code point above ASCII 126 as an uppercase hexadecimal numeric reference. It iterates Unicode code points, so a supplementary emoji becomes one numeric reference rather than two invalid surrogate references. Use it only when a legacy workflow, transport, teaching example, or comparison task genuinely needs that representation. Modern UTF-8 HTML can contain Unicode directly, and MDN recommends avoiding unnecessary references.
Treat Decoded Output as Untrusted Data
Decoding is not sanitization. It reveals characters; it does not decide whether the surrounding text is safe for a destination. A reference such as <script> can become the literal characters <script>. The decoder does not execute that string, but copying it into an unsafe innerHTML sink could cause a script element to be created.
Character references are context-sensitive. Escaping text for an HTML text node is not the same as constructing a URL, JavaScript string, CSS value, SQL query, or HTTP header. This tool provides general HTML syntax escaping and reference decoding; use a dedicated mechanism for each non-HTML context.
- HTML text node: Decode when you need the underlying characters for inspection, then rely on the template or framework’s context-aware output behavior.
- HTML markup or URL: Do not assume general entity encoding covers every attribute, URL, or scheme rule.
- JavaScript or CSS: Use the language’s own string or value encoding rules; HTML entity references are not a substitute.
- SQL or an HTTP header: Use database parameterization and the protocol’s header rules instead of HTML escaping.
- Untrusted markup: Use a trusted sanitizer when the task is to allow a defined set of markup. The encoder does not remove dangerous elements.
Framework auto-escaping, a trusted templating engine, sanitization, and Content Security Policy solve different parts of the problem. None is a substitute for choosing the correct output boundary. Treat decoded output as untrusted data and apply context-appropriate escaping there.
Limits and Checks Before You Copy
- Input size: Each paste can contain up to 500,000 JavaScript characters.
- Browser parsing: The decoder uses the HTML parser in the current browser. Legacy parsing details may be preserved or normalized according to that browser’s implementation of the HTML standard.
- HTML versus XML: XML has a much smaller predefined entity set and different parsing rules. Do not treat HTML decoding as XML validation or assume every HTML named reference is predefined in XML.
- No persistent history: The page does not save history, transmit the input, or retrieve a remote entity table.
- Small-sample check: Convert a few representative references first, inspect ampersands and angle brackets, and only then process the larger paste.
- Destination check: Copy the result only after confirming that its form is correct for the receiving context.
When HTML Unescaping Is the Wrong Operation
Use another workflow when the input is not an HTML character-reference problem. Percent-encoded URL text needs URL decoding, Base64 data needs a Base64 decoder, and an XML document needs XML-aware rules. A JavaScript, CSS, SQL, or HTTP header value should be handled by the library or protocol that defines that context.
When the goal is to understand how a named or numeric HTML reference resolves, Decode references is the relevant operation. When the goal is to place arbitrary text into a page, use the output only inside a context-aware HTML workflow and do not treat the decoder as a sanitizer or rendering engine.
Related reading: Morse Code Translator on iPhone: Text, Audio & Copy.
Related reading: How to Check the Result After Hiding a Message in Text.