HTML Entity Encoder & Decoder
Encode special characters to HTML entities or decode entities back to text. Supports named, decimal, and hexadecimal entity formats.
Common HTML Entities
| Character | Named | Decimal | Hex | Description |
|---|---|---|---|---|
| & | & | & | & | Ampersand |
| < | < | < | < | Less than |
| > | > | > | > | Greater than |
| " | " | " | " | Double quote |
| ' | ' | ' | ' | Single quote / apostrophe |
| ⎵ | |   |   | Non-breaking space |
| © | © | © | © | Copyright |
| ® | ® | ® | ® | Registered |
| ™ | ™ | ™ | ™ | Trademark |
| € | € | € | € | Euro sign |
| £ | £ | £ | £ | Pound sign |
| — | — | — | — | Em dash |
| – | – | – | – | En dash |
| … | … | … | … | Ellipsis |
| ° | ° | ° | ° | Degree |
| × | × | × | × | Multiplication |
| ÷ | ÷ | ÷ | ÷ | Division |
| → | → | → | → | Right arrow |
Related Tools
Frequently Asked Questions
Why do I need to encode HTML entities?
HTML entities prevent special characters from being interpreted as HTML markup. For example, < and > in text content would be parsed as tags without encoding. Encoding also prevents XSS (cross-site scripting) attacks by neutralizing injected HTML.
What's the difference between named, decimal, and hex entities?
Named entities use readable names (like & for &). Decimal entities use the Unicode code point in base 10 (&). Hex entities use base 16 (&). All three render identically in browsers. Named entities are most readable; numeric entities work for any Unicode character.
Which characters must be encoded in HTML?
The 5 mandatory characters are: & (ampersand), < (less than), > (greater than), " (double quote in attributes), and ' (single quote in attributes). All other characters can optionally be encoded for safety or to handle encoding issues.
What does 'All Chars' encoding mode do?
All Chars mode encodes every character that has a named entity (like © for ©) plus all non-ASCII characters using hex notation. This is useful when you need to ensure your HTML is pure ASCII-safe, for example in email templates or legacy systems.