🔤 HTML Entity Encoder
Encode special characters as HTML entities and decode entities back to plain text. Choose named, decimal, or hexadecimal entity format.
| & | & | & | Ampersand |
| < | < | < | Less-than |
| > | > | > | Greater-than |
| " | " | " | Double quote |
| ' | ' | ' | Single quote / apostrophe |
| |   | Non-breaking space | |
| © | © | © | Copyright © |
| ® | ® | ® | Registered ® |
| ™ | ™ | ™ | Trademark ™ |
| € | € | € | Euro € |
| £ | £ | £ | Pound £ |
| ¥ | ¥ | ¥ | Yen ¥ |
| — | — | — | Em dash — |
| – | – | – | En dash – |
| … | … | … | Ellipsis … |
FAQ
When should I encode HTML entities?
You should encode entities whenever you insert user-supplied text into HTML to prevent XSS (Cross-Site Scripting) attacks. At minimum, encode &, <, >, ", and '. In HTML attribute values, also encode the quote character wrapping the attribute.
What does "Encode ALL non-ASCII" do?
When checked, every character with a code point above 127 is also encoded — e.g., é becomes é. This is useful when working with legacy systems that only support ASCII, or when embedding content in environments that may misinterpret high-byte characters.
Which entity format should I use?
Named entities are most readable (&). Decimal numeric entities work universally (&). Hex numeric entities (&) are common in XML and some APIs. All are semantically equivalent in HTML5.
Can I decode multiple different entity types at once?
Yes — the decoder handles named, decimal, and hexadecimal entities simultaneously. Paste any mix of entity formats and click Decode to get the plain text representation.