HTML Entity Encoder
Convert special characters into HTML entities for safe rendering in HTML documents.
Text → HTML Entities
HTML Entities → Text
Common HTML Entities
| Character | Entity | Numeric | Description |
|---|---|---|---|
| < | < | < | Less than |
| > | > | > | Greater than |
| & | & | & | Ampersand |
| " | " | " | Quotation mark |
| ' | ' | ' | Apostrophe |
|   | Non-breaking space | |
| © | © | © | Copyright |
| ® | ® | ® | Registered |
| ™ | ™ | ™ | Trademark |
| € | € | € | Euro |
| ä | ä | ä | a umlaut |
| ö | ö | ö | o umlaut |
| ü | ü | ü | u umlaut |
What are HTML Entities?
HTML entities are special character sequences that represent reserved or non-printable characters in HTML.
Format: &name; oder &#nummer;
Why does it matter?
- Security: Prevents XSS attacks
- Correct rendering: Shows < and > as text
- Special characters: © ® ™ € etc.
- Umlauts: ä ö ü without UTF-8
Tips
- Always escape
<>& - In attributes also escape
" - UTF-8 makes entity umlauts unnecessary
- Numeric entities are more universal
PHP Example
// Encode
htmlspecialchars($text);
// Decode
html_entity_decode($text); Was this tool helpful?