📄 HTML Entity Encoder
HTML entity encoding and decoding
Output Result
📚 User Guide
What is HTML Entity?
HTML entities are codes used to display reserved or special characters in HTML. They start with & and end with ;.
Why need HTML Entities?
- Some characters are reserved in HTML (such as <, >, &)
- Prevent XSS attacks
- Display special symbols
- Ensure correct character display
Common HTML Entities
| Character | Entity Name | Entity Number | Description |
|---|---|---|---|
| < | < | < | Less than |
| > | > | > | Greater than |
| & | & | & | Ampersand |
| " | " | " | Double quote |
| ' | ' | ' | Single quote |
| Space | |   | Non-breaking space |
| © | © | © | Copyright symbol |
Use Cases
- Display code in HTML
- Prevent XSS injection attacks
- Display special symbols
- Escape user input
Examples
Original text:Hello & "World"Encoded: <div class="example">Hello & "World"</div>
Security Tips
- Always escape user input for HTML
- Do not trust data from client-side
- Use Content Security Policy (CSP)
- Regularly check for XSS vulnerabilities