HTML Entity Encoder & Decoder
Encode special characters to HTML entities or decode them back to text. Free, instant.
What are HTML entities?
HTML entities are special codes that represent characters that have reserved meaning in HTML or that are not available on a standard keyboard. For example,< represents < and & represents &. Without encoding, these characters would be interpreted as HTML tags or attributes instead of being displayed as text.
Common HTML entities
| Character | Entity Name | Entity Number | Description |
|---|---|---|---|
| & | & | & | Ampersand |
| < | < | < | Less than |
| > | > | > | Greater than |
| " | " | " | Double quote |
| ' | ' | ' | Single quote |
| © | © | © | Copyright |
| ® | ® | ® | Registered |
Frequently Asked Questions
When should I encode HTML entities?
Always encode user-generated content that is displayed in HTML to prevent XSS (Cross-Site Scripting) attacks. Also encode when displaying code snippets, special characters in attributes, or characters outside the ASCII range.
Is HTML encoding the same as URL encoding?
No. HTML encoding converts characters to HTML entities (e.g., & → &) for safe display in web pages. URL encoding converts characters to percent-encoded values (e.g., & → %26) for safe inclusion in URLs. They serve different purposes.
Related free tools
Browse all toolsFormat, validate, and beautify JSON instantly. Find syntax errors with line numbers. JSON linter.
Encode text to Base64 or decode Base64 strings back to plain text. Supports unicode and images.
Convert between HEX, RGB, HSL, and CMYK color codes with a live color preview.
Encode or decode URLs and query strings. Handle special characters safely. URL validator.