Encode HTML Code to String Online

Convert string/text to html encoded text easily.
Give Rating

Encode HTML to String

How to Convert HTML to Encoded String

  1. Enter HTML in input text area.
  2. Click on Show Output button to generate encoded HTML

Uses

  • for using HTML as string for preview
  • safe parsing of html code

Examples

If you input data

<div class="className">
    <h3>Hello World</h3>
    <p class="paragarph">Hello</p>
</div>

the output would be:

&lt;div class="className"&gt;
    &lt;h3&gt;Hello World&lt;/h3&gt;
    &lt;p class="paragarph"&gt;Hello&lt;/p&gt;
&lt;/div&gt;