Home Tools HTML Encoder

HTML Encoder tool helps you encode HTML special characters to their corresponding HTML entities. This is essential for displaying HTML code as text on web pages and preventing XSS (Cross-Site Scripting) attacks.

The tool converts characters like < > & " ' to their HTML entity equivalents (&lt; &gt; &amp; &quot; &#x27;). Simply paste your HTML content in the input box and click "Encode HTML" to get the encoded output.

Common HTML entities:

  • < becomes &lt;
  • > becomes &gt;
  • & becomes &amp;
  • " becomes &quot;
  • ' becomes &#x27;
Encode all characters (including non-ASCII)