&<>"'©®™€ Encode special characters to HTML entities or decode them back. HTML entities represent reserved characters (< > & " ') and special symbols in a safe, displayable format (e.g., < & €). Defined in the HTML/XML specifications and W3C standards, entity encoding is essential for preventing XSS attacks, displaying code in web pages, and handling international characters.
Instantly encode and decode HTML entities with support for named entities (©) and numeric entities (©). 100% free, no registration, and complete privacy — everything runs locally in your browser, so your data never touches a server.
Switch between encode and decode modes to convert special characters to HTML entities or reverse the process.
Safely escape user input before displaying it in HTML to prevent Cross-Site Scripting attacks.
Copy encoded or decoded output directly to the clipboard.
Built-in reference table of common HTML entities with names and descriptions.
HTML Entity Encoding Example
Original HTML
<div>Hello & goodbye</div>Output:
<div>Hello & goodbye</div>HTML entities are text representations of special characters that have meaning in HTML/XML, like < > & " and '. Characters like < are interpreted as tag delimiters, so to display them literally, you must encode them: < > & ". Entities are also used to display symbols (©, ®, €) and international characters safely.
Named entities use a name (e.g., © for ©, € for €). Numeric entities use the character code: decimal (© for ©) or hexadecimal (© for ©). Both are valid and interchangeable. Named entities are more readable; numeric entities work for any Unicode character.
Encoding user input prevents Cross-Site Scripting (XSS) attacks. If a user submits <script>alert('XSS')</script>, encoding it to <script>... prevents the browser from executing it as code. Always encode untrusted input before displaying it in HTML.
Encode the HTML code using this tool, then paste the encoded version into your page. The browser will display the encoded entities as visible text rather than interpreting them as HTML. For example: <div>Hello</div> displays as <div>Hello</div> (as text, not a real div).
No. Only characters that have special meaning in HTML (&, <, >, ", ') MUST be encoded. Other characters (like © or €) can be encoded for compatibility, but don't have to be. Use named entities (©, €) or numeric entities (©, €) for symbols.
Modern HTML5 uses UTF-8 encoding, so most international characters and emoji can be used directly without encoding. However, for maximum compatibility with older systems, you can encode them numerically: emoji 🎉 encodes to 🎉 or 🎉. This tool focuses on the critical security entities.
We use cookies for analytics and personalized ads to help keep these tools free. Until you accept, ads stay non-personalized and analytics cookies are off. See our Privacy Policy.