HTML Entity Encode & Decode

Encode and decode HTML entities instantly. Convert special characters to HTML entities and back. Free online tool running entirely in your browser.

Loading tool...

Frequently Asked Questions

What are HTML entities?

HTML entities are special codes that represent characters with meaning in HTML. For example, &lt; represents <, &gt; represents >, &amp; represents &, and &quot; represents ". They prevent browsers from interpreting these characters as HTML markup.

Why do I need to encode HTML entities?

HTML entity encoding prevents Cross-Site Scripting (XSS) attacks and ensures special characters display correctly. When inserting user-generated content into HTML, encoding prevents malicious script injection and rendering issues.

What characters need HTML encoding?

The five essential characters to encode are: < (&lt;), > (&gt;), & (&amp;), " (&quot;), and ' (&#39;). These have special meaning in HTML and must be encoded when used as literal text content.

Can I decode HTML entities back to text?

Yes. Paste the HTML-encoded string into the input, select Decode, and the tool converts entities back to their original characters. This works for both named entities (&amp;) and numeric entities (&#38;).

Is this tool free?

Yes. All KappaKit tools are free, run in your browser, and require no signup or account.

Built by Michael Lip. 100% client-side — no data leaves your browser.

Usage data from our Developer Tool Usage Report 2026 — real npm download stats analyzed