HTML Entity Encoder / Decoder
Convert text to HTML entities or decode entities back to readable characters. Supports named, numeric, and hexadecimal entities.
HTML Entity Reference
| Char | Named | Numeric | Description |
|---|---|---|---|
| & | Ampersand | ||
| < | Less than | ||
| > | Greater than | ||
| " | Double quote | ||
| ' | Apostrophe | ||
| [ ] | Non-breaking space | ||
| © | Copyright | ||
| ® | Registered | ||
| ™ | Trademark | ||
| ¢ | Cent | ||
| £ | Pound | ||
| ¥ | Yen | ||
| € | Euro | ||
| ° | Degree | ||
| ± | Plus-minus | ||
| × | Multiplication | ||
| ÷ | Division | ||
| ≠ | Not equal | ||
| ≤ | Less or equal | ||
| ≥ | Greater or equal | ||
| ∞ | Infinity | ||
| ∑ | Summation | ||
| √ | Square root | ||
| ← | Left arrow | ||
| ↑ | Up arrow | ||
| → | Right arrow | ||
| ↓ | Down arrow | ||
| ↔ | Left-right arrow | ||
| • | Bullet | ||
| … | Ellipsis | ||
| – | En dash | ||
| — | Em dash | ||
| ‘ | Left single quote | ||
| ’ | Right single quote | ||
| “ | Left double quote | ||
| ” | Right double quote | ||
| « | Left guillemet | ||
| » | Right guillemet | ||
| ¼ | One quarter | ||
| ½ | One half | ||
| ¾ | Three quarters | ||
| ¿ | Inverted question | ||
| ¡ | Inverted exclamation | ||
| ¶ | Paragraph | ||
| § | Section | ||
| † | Dagger | ||
| ‡ | Double dagger | ||
| ♠ | Spade | ||
| ♣ | Club | ||
| ♥ | Heart | ||
| ♦ | Diamond |
What Are HTML Entities?
HTML entities are special sequences used to represent characters that have a reserved meaning in HTML or characters that cannot be easily typed on a keyboard. For example, the less-than sign (<) is written as <to prevent the browser from interpreting it as an HTML tag. Entities start with an ampersand (&) and end with a semicolon (;).
Named vs Numeric Entities
Named entities use a human-readable name like © for the copyright symbol. Numeric entities use the Unicode code point in decimal (©) or hexadecimal (©) form. Numeric entities can represent any Unicode character, while named entities are limited to a predefined set.
When to Encode HTML Entities
- Preventing XSS attacks — Encoding user input before rendering it in HTML prevents malicious script injection.
- Displaying code snippets — When showing HTML source code on a webpage, entities prevent the browser from interpreting the tags.
- Special characters in content— Characters like &, <, >, and " must be encoded to display correctly in HTML documents.
- Email obfuscation — Encoding email addresses as entities can help reduce spam harvesting.
How to Use This Tool
- Choose a mode — Select Encode to convert text to entities, or Decode to convert entities back to text.
- Paste your text — Enter the content you want to convert in the input area.
- Configure options — Choose between named or numeric entities, and whether to encode all characters or only special ones.
- Copy the result — Click the copy button to copy the converted output to your clipboard.
- Use the reference table — Browse or search common HTML entities. Click any entity to copy it instantly.
Common HTML Entities
The most frequently used HTML entities include & for the ampersand, < and > for angle brackets, " for double quotes, and for non-breaking spaces. Beyond these basics, HTML supports entities for currency symbols, mathematical operators, arrows, Greek letters, and many other special characters.