HTML Entity Encoder & Decoder
Paste your text, pick a direction, and get instantly escaped or unescaped HTML content. Safe, fast, and private – everything stays in your browser.
Output
Encoded
Common HTML Entities
A handy reference for the characters you'll encode most often.
| Character | Entity name | Entity number | Description |
|---|---|---|---|
| & | & | & | Ampersand |
| < | < | < | Less than |
| > | > | > | Greater than |
| " | " | " | Double quote |
| ' | ' | ' | Single quote |
| © | © | © | Copyright |
| ® | ® | ® | Registered |
| ™ | ™ | ™ | Trademark |
| € | € | € | Euro |
| £ | £ | £ | Pound |
Why encode HTML entities?
Prevent XSS attacks
Encoding user-generated content stops malicious scripts from executing in the browser. Every <script> tag becomes harmless text.
Valid markup
Reserved characters like <, >, and & break HTML when used literally. Encoding keeps your pages valid and predictable.
Display code snippets
When you want to show HTML or JavaScript examples on a page, encoding ensures the browser renders the source instead of interpreting it.
Safe templating
Whether you're building emails, static sites, or CMS templates, encoding guarantees that dynamic data won't corrupt your layout.