HTML Entity Encoder

Encode and decode HTML entities like &, <, > and more.

How it works

Paste HTML content to encode special characters into HTML entities (< becomes &lt;, > becomes &gt;, & becomes &amp;). Or paste encoded HTML to decode it back to readable characters. Handles the full HTML5 entity set.

Why use this tool?

Required when embedding user-generated content in HTML to prevent XSS (cross-site scripting) attacks. Also used when displaying raw HTML code in blog posts and documentation without the browser rendering it.

Back to all tools

More Developer Tools Tools