HTML Encoder/Decoder
Convert HTML special characters to entities and vice versa
Input HTML
0 characters
Common HTML Entities
| Character | Entity Name | Entity Number | Description |
|---|---|---|---|
| < | < |
< |
Less than |
| > | > |
> |
Greater than |
| & | & |
& |
Ampersand |
| " | " |
" |
Double quote |
| ' | ' |
' |
Single quote/apostrophe |
|
  |
Non-breaking space | |
| © | © |
© |
Copyright symbol |
Result
Show Preview
0 characters
When to Use HTML Encoding
HTML encoding is important in web development for:
- Security: Preventing XSS attacks by encoding user input
- Display: Showing HTML code examples on web pages
- Compatibility: Ensuring special characters display correctly
- Validation: Making sure HTML is properly formed
Tip: Always encode user input before displaying it on your website to prevent cross-site scripting (XSS) attacks.