HTML Encoder / Decoder

Encode special characters to HTML entities or decode them back.

Input
Output

What is HTML Encoding?

HTML encoding converts special characters like <, >, &, and quotes into their HTML entity equivalents (e.g., &lt;, &gt;, &amp;). This is essential for safely displaying user-generated content in web pages and preventing XSS attacks. Use Encode to convert raw text to HTML-safe format, or Decode to convert HTML entities back to readable text.