HTML Entities Encoder & Decoder

Convert special characters to and from HTML entity representations. Supports named, decimal, and hexadecimal entities to prevent XSS and rendering bugs.

Samples:
Entity Format:
Result:
</> Embed this tool on your website / blog No code required · Copy and paste
HTML Embed Code (iframe):
<iframe src="https://lucentool.com/html-entities" width="100%" height="650" style="border:1px solid #e5e0d8;border-radius:12px;max-width:850px;width:100%;" frameborder="0"></iframe>
<div style="font-size:12px;color:#78716c;margin-top:6px;font-family:sans-serif;">Powered by <a href="https://lucentool.com/html-entities" target="_blank" style="color:#c85a32;text-decoration:none;">Lucentool - HTML Entities Encoder & Decoder</a></div>

Why Escape HTML Characters?

In HTML, characters like <, >, and & are syntactically reserved for tags and references. Unescaped user inputs can trigger layout breaks or dangerous Cross-Site Scripting (XSS) vulnerabilities. Escaping them ensures raw code displays safely as plain text.

The Five XML/HTML Core Entities