HTML Entity Encoder & Decoder
Encode special characters to HTML entities or decode entities back to text. Live preview as you type. Supports named, decimal, and hexadecimal entity formats.
HTML Entity Reference
Click any entity to copy it to your clipboard.
HTML Core
| Char | Named | Decimal | Hex | Description |
|---|---|---|---|---|
| & | Ampersand | |||
| < | Less than | |||
| > | Greater than | |||
| " | Double quote | |||
| ' | Apostrophe | |||
| ⎵ | Non-breaking space |
Copyright & Trademark
| Char | Named | Decimal | Hex | Description |
|---|---|---|---|---|
| © | Copyright | |||
| ® | Registered | |||
| ™ | Trademark |
Currency
| Char | Named | Decimal | Hex | Description |
|---|---|---|---|---|
| € | Euro | |||
| £ | Pound | |||
| ¥ | Yen | |||
| ¢ | Cent |
Arrows
| Char | Named | Decimal | Hex | Description |
|---|---|---|---|---|
| ← | Left arrow | |||
| → | Right arrow | |||
| ↑ | Up arrow | |||
| ↓ | Down arrow | |||
| ↔ | Left-right arrow |
Math
| Char | Named | Decimal | Hex | Description |
|---|---|---|---|---|
| × | Multiplication | |||
| ÷ | Division | |||
| ± | Plus-minus | |||
| ≠ | Not equal | |||
| ≤ | Less or equal | |||
| ≥ | Greater or equal | |||
| ∞ | Infinity | |||
| ° | Degree | |||
| ½ | One half | |||
| ¼ | One quarter | |||
| ¾ | Three quarters |
Typography
| Char | Named | Decimal | Hex | Description |
|---|---|---|---|---|
| — | Em dash | |||
| – | En dash | |||
| … | Ellipsis | |||
| • | Bullet | |||
| · | Middle dot | |||
| “ | Left double quote | |||
| ” | Right double quote | |||
| ‘ | Left single quote | |||
| ’ | Right single quote | |||
| « | Left guillemet | |||
| » | Right guillemet |
HTML Entity Tips
Prevent XSS attacks
Always encode user-supplied text before inserting into HTML. Characters like <script> become safe <script> entities.
Named vs numeric
Named entities (&) are readable but limited. Numeric entities (& or &) work for any Unicode character.
Email-safe HTML
Use "All Chars" mode to convert non-ASCII characters to entities. This ensures compatibility with email clients that don't support UTF-8.
The 5 mandatory characters
Always encode & < > " ' in HTML content. These are the characters that can break HTML parsing.
Bulk processing
Enable bulk mode to process multiple lines at once. Each line is encoded/decoded independently.
All processing is local
Your data never leaves your browser. Encoding and decoding happens entirely in JavaScript.
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 is 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.
Is my data safe?
Yes. All processing happens entirely in your browser using JavaScript. No data is sent to any server.