HTML Entity Encode

Paste HTML or text below and click Encode to escape special characters as HTML entities. All processing happens locally in your browser.

Copied!

What is HTML Entity Encoding?

HTML entity encoding converts special characters into their HTML entity equivalents to prevent them from being interpreted as HTML markup. For example:

  • <&lt;
  • >&gt;
  • &&amp;
  • "&quot;
  • '&#39;

This prevents XSS attacks and ensures text displays correctly in HTML documents.