HTML Entity
Convert special characters to HTML entities and decode HTML entities back to plain text. Essential for web development and XSS prevention.
Mode
Encode to HTML Entities
Decode HTML Entities
Result
Statistics:
Common HTML Entities Reference
| Character | Named Entity | Numeric | Description |
|---|---|---|---|
| < | < | < | Less than |
| > | > | > | Greater than |
| & | & | & | Ampersand |
| " | " | " | Double quote |
| ' | ' | ' | Single quote |
| |   | Non-breaking space | |
| © | © | © | Copyright |
| ® | ® | ® | Registered trademark |
| ™ | ™ | ™ | Trademark |
| € | € | € | Euro sign |
About HTML Entities
HTML entities are used to display reserved characters in HTML and to display characters that are not present on the keyboard. They begin with an ampersand (&) and end with a semicolon (;).
Why Use HTML Entities?
- Reserved Characters: Display <, >, & in HTML
- XSS Prevention: Escape user input safely
- Special Symbols: Display ©, ®, ™, etc.
- Non-ASCII: Ensure compatibility across encodings
Entity Types
- Named: < (easier to read)
- Numeric: < (decimal code point)
- Hex: < (hexadecimal code point)
- All Valid: Browser interprets all formats
Security Note: Always encode user-generated content before displaying in HTML to prevent XSS (Cross-Site Scripting) attacks. At minimum, encode < > & " and '.
Feedback
Help us improve this page by providing feedback:
Sending...
Feedback sent. Thank you!
Error occurred!