HTML Entity Encoder
Encode and decode HTML entities. Convert special characters to named or numeric entities.
Common HTML Entities Reference
| Character | Named Entity | Numeric Entity | Description |
|---|---|---|---|
| < | < | < | Less than |
| > | > | > | Greater than |
| & | & | & | Ampersand |
| " | " | " | Quotation mark |
| ' | ' | ' | Apostrophe |
| |   | Non-breaking space |
- Encode text to HTML entities
- Decode HTML entities to plain text
- Named entity encoding (<, >, etc.)
- Numeric entity encoding (<, >, etc.)
- Hexadecimal entity encoding (<, >, etc.)
- Common entities reference table
- To Encode: Paste text with special characters, choose encoding type, click Encode
- To Decode: Paste HTML entities, click Decode
- Copy the result to use in your HTML
Use HTML entities to display special characters like <, >, & in HTML without the browser interpreting them as code. Essential for displaying code snippets or user-generated content safely.
Named entities (<) are more readable but limited in scope. Numeric entities (<) work for all Unicode characters. Use named for common characters, numeric for special symbols.
Yes! Encoding user input prevents XSS attacks. Always encode user-generated content before displaying it in HTML to prevent malicious script injection.