HTML Encoder

Encode special characters to HTML entities. Prevents XSS and ensures safe display of user content in HTML pages. Supports minimal and full encoding modes.

Mode:
Examples:
Plain text / HTML
Encoded output7 entities
<script>alert("XSS")</script>

Common HTML entities

Why encode HTML?

HTML entities prevent browsers from interpreting user input as markup. Always encode <, >, &, and quotes when rendering untrusted content to prevent XSS attacks.