Toollance

HTML Encoder

Encode HTML special characters to HTML entities online. Safely escape &, <, >, ", and ' to prevent XSS and render HTML as literal text.

HTML-Entities Output

What is HTML Encoding?

HTML encoding (or HTML escaping) converts special HTML characters into their corresponding HTML entity equivalents. This prevents browsers from interpreting the characters as HTML markup.

How to use this tool

  1. Paste your text or HTML into the input field
  2. Click Encode to convert special characters to HTML entities
  3. Copy the encoded output for safe use in HTML documents

Characters encoded

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

Common use cases

Example

Input: <script>alert("Hello & World")</script>

Output: &lt;script&gt;alert(&quot;Hello &amp; World&quot;)&lt;/script&gt;

Privacy

All processing happens in your browser. Nothing is transmitted.