About the HTML Entity Encoder
The HTML Entity Encoder replaces ampersands, angle brackets, quotation marks and apostrophes with safe named or numeric entities. It is useful for examples and plain text inserted into HTML contexts.
How to use the HTML Entity Encoder
- Enter the text that should appear literally.
- Encode the sensitive characters.
- Use the result in an appropriate HTML text or attribute context.
Practical tips
- Context matters: URL, CSS and JavaScript contexts need their own escaping rules.
- Avoid encoding the same string twice.