<link rel="canonical"> · <meta name="description">
HTML entity encoding converts special characters into their corresponding HTML entity representations. For example, the less-than sign (<) becomes <, the greater-than sign (>) becomes >, and the ampersand (&) becomes &. This is essential when you want to display HTML code on a webpage without the browser interpreting it as actual HTML tags.
When you're building websites or writing content that includes technical documentation, you often need to show HTML tags as text. If you type
Content management systems, discussion forums, and code tutorial websites all rely on HTML entity encoding to safely display user content that might include HTML-like syntax. It prevents cross-site scripting (XSS) attacks by ensuring user input is treated as text, not code.
< - Less than sign (<)> - Greater than sign (>)& - Ampersand (&)" - Double quote (")' - Single quote (' or ')© - Copyright symbol (©)® - Registered trademark (®)™ - Trademark (™) - Non-breaking space ( )HTML encoding and URL encoding serve different purposes. HTML encoding targets characters that have special meaning in HTML context, primarily <, >, &, and quotes. URL encoding (percent-encoding) targets characters that are illegal or have special meaning in URLs, such as spaces, slashes, and question marks. Our separate URL Encoder tool handles URL-specific encoding.