🛠️ HTML Entity Encoder / Decoder
Common HTML Entities
Encode special characters to HTML entities or decode HTML entities back to text. Prevent XSS vulnerabilities and display HTML code safely. Includes a reference chart of common entities.
Common HTML Entities
Paste your HTML or text containing special characters into the input box above.
Click Encode Entities to convert special characters like <, >, &, and " into their HTML entity equivalents.
Or click Decode Entities to convert HTML entities back to their original characters.
Click Copy to copy the result to your clipboard.
HTML entities are special character codes used to represent characters that have special meaning in HTML, or characters that can't easily be typed on a keyboard. They start with an ampersand (&) and end with a semicolon (;). For example, < represents the less-than sign (<).
When you include user-generated content or code snippets in an HTML page, characters like < and > would be interpreted as HTML tags. Encoding them prevents the browser from treating them as markup, which is critical for preventing Cross-Site Scripting (XSS) vulnerabilities and for displaying source code correctly.