Back to Tools
HTML Entities Encoder/Decoder
Encode special characters into HTML entities or decode them back to plain text. Useful for web development and preventing XSS.
What are HTML Entities?
HTML entities are used to display reserved characters in HTML or to display characters that are not available on a standard keyboard. For example, to display the "less than" sign (<) in HTML, you should use the entity < or <.
Why Encode HTML?
- Prevent XSS: Encoding user input is a critical security step to prevent Cross-Site Scripting (XSS) attacks.
- Display Code: If you want to show HTML tags as literal text on a page, you must encode them.
- Character Support: Safely use special characters across different encodings.
Common Entities
| Character | Entity Name | Entity Number |
|---|---|---|
< | < | < |
> | > | > |
& | & | & |
" | " | " |