Encode special characters to HTML entities or decode HTML entities back to text. Prevent XSS and display special characters safely.
< → < or <
> → > or >
& → & or &
" → " or "
' → ' or '
© → © or ©
This free HTML entity encoder converts special characters to HTML entities to prevent XSS attacks and display reserved characters safely in HTML. HTML entities are text representations of special characters that browsers interpret correctly.
What are HTML Entities? HTML entities are codes that represent special characters. They start with & and end with ;. For example, < represents < and & represents &. They can be named (<) or numeric (<).
Why Use HTML Entities? To display reserved HTML characters (<, >, &, ", '), prevent XSS attacks, display special symbols (©, ®, €), ensure proper character rendering, and safely embed user-generated content.
Use Cases: XSS prevention, displaying code snippets, user-generated content, special character display, email templates, XML/HTML documents, form validation, content sanitization.