HTML Entity
Encoder
Encode HTML special characters into entities or decode entities back to characters. & → &, < → <, and more — bidirectional.
Special Character Reference
| Char | Entity | Description |
|---|---|---|
| & | & | Ampersand |
| < | < | Less than |
| > | > | Greater than |
| " | " | Double quote |
| ' | ' | Single quote |
| | Non-breaking space | |
| © | © | Copyright |
| ® | ® | Registered trademark |
| ™ | ™ | Trademark |
| € | € | Euro |
| £ | £ | Pound |
| ¥ | ¥ | Yen / Yuan |
| ° | ° | Degree |
| ± | ± | Plus-minus |
| × | × | Multiplication |
| ÷ | ÷ | Division |
About HTML Entity Encoder
HTML reserves certain characters for its own syntax. The angle brackets < and > define tags, and the ampersand & begins an entity reference. When these characters appear in text content, they must be escaped as HTML entities (<, >, &) to prevent browsers from misinterpreting them as markup.
HTML entities start with & and end with ;. They come in two forms: named (&) and numeric (&). Both represent the same character and work in all modern browsers. Proper escaping is also essential for security — failing to escape user-supplied text before injecting it into HTML is a classic XSS (Cross-Site Scripting) vulnerability.
This tool lets you encode special characters into their HTML entity equivalents, or decode entities back into readable text. A reference table of commonly used entities is included for quick lookup. Useful for writing HTML templates, email templates, documentation, and any scenario where raw text must be safely embedded in an HTML document.
- ▸Escaping user input before inserting it into HTML to prevent XSS
- ▸Correctly displaying special characters in HTML email templates
- ▸Showing raw HTML code examples on a web page without rendering them
- ▸Writing meta title and description tags containing & < > or "
- ▸Decoding HTML entities from legacy system output