<
HTML Entity Encode/Decode
Encode or decode HTML entities.
How to use
Encoding HTML entities
Converts characters that have special meaning in HTML into their safe entity equivalents: < → <, > → >, & → &. Use this before inserting user-provided text into HTML to prevent XSS.
Decoding HTML entities
Converts entities back to their original characters. Useful when parsing HTML content from an API or web scrape where entities appear literally in the text.
XSS prevention
Always encode user-supplied content before rendering it in HTML. Even a string that looks harmless can contain <script> tags or event handlers that execute when the browser parses the page.
Related Tools
Embed This Tool
Add this tool to your site or blog:
New Tool Every Week
Get notified when we ship new tools and Android apps. One email, no fluff.