Free HTML Entity Encoder & Decoder Online
Convert special and unicode characters to HTML entities — named or numeric — and decode them back. Encode everything or just the essential XSS-sensitive characters.
Common HTML Entities
| Char | Named | Numeric | Description |
|---|---|---|---|
| & | & | & | Ampersand |
| < | < | < | Less than |
| > | > | > | Greater than |
| " | " | " | Double quote |
| ' | ' | ' | Apostrophe |
| |   | Non-breaking space | |
| © | © | © | Copyright |
| ® | ® | ® | Registered |
| ™ | ™ | ™ | Trademark |
| € | € | € | Euro |
| £ | £ | £ | Pound |
| ¥ | ¥ | ¥ | Yen |
| ¢ | ¢ | ¢ | Cent |
| ° | ° | ° | Degree |
| ± | ± | ± | Plus-minus |
| × | × | × | Multiplication |
| ÷ | ÷ | ÷ | Division |
| — | — | — | Em dash |
| – | – | – | En dash |
| … | … | … | Ellipsis |
Frequently Asked Questions
- What are HTML entities?
- HTML entities are special codes used to represent characters that have special meaning in HTML (like < and >) or characters that are difficult to type directly.
- Why do I need to encode HTML entities?
- To prevent XSS (cross-site scripting) attacks and to ensure your HTML renders correctly when displaying user-submitted content.
- What is the difference between & and &?
- Both represent the & character. & is the named entity (human-readable), while & is the numeric entity (decimal). Both are valid HTML.
- Does HTML entity encoding make my site secure?
- Entity encoding output displayed in HTML helps prevent XSS. However, full security requires server-side validation and context-aware encoding.
- What is the HTML entity for a space?
- A non-breaking space is ( ). Regular spaces do not need to be encoded.