HTML Entities Encoder
Encode special characters into HTML entities.
About the HTML Entities Encoder
HTML entity encoding converts characters like <, >, and & into safe entity forms so text can appear in HTML without being interpreted as markup. It is a building block for displaying user-provided text safely.
How to use
- Paste the raw text that may contain HTML-special characters.
- Encode entities.
- Place the encoded output into HTML content contexts that expect escaped text.
Tips
- Encoding helps display text; it is not a complete XSS strategy by itself for every context (attributes, JS, URLs differ).
- Do not double-encode content that is already escaped.
- Decode when you need the original characters again.
FAQ
Should I encode an entire HTML document? Usually no — encode the text nodes/values that must remain literal text.