HTML Entity Encoder
Encode and decode HTML entities for safe display
Read the full guideCommon HTML Entities:
Powered by html-entities library with full HTML5 entity support.
Display code snippets and special characters safely on the web. Convert reserved characters like < and > into their corresponding HTML entities to prevent the browser from interpreting them as actual code.
HTML entities are strings that begin with an ampersand (&) and end with a semicolon (;). They are used to display reserved characters (which would otherwise be interpreted as HTML tags) and invisible characters (like non-breaking spaces).
Displaying Code
Use this when you want to show HTML or JavaScript snippets inside a <code> tag without executing them.
XSS Protection
Sanitize user input before rendering it on a page to prevent script injection.
Our tool maps characters to their HTML5 named entities (like © for ©) or numeric entities. It protects your site from Cross-Site Scripting (XSS) by neutralizing potentially malicious tags.
| Char | Named Entity | Dec Entity |
| < | < | < |
| > | > | > |
| & | & | & |
HTML5 entities are supported by all browsers and email clients, ensuring consistent rendering across all platforms.