HTML Encoder / Decoder

Convert special characters to HTML entities and back.

About HTML Encoding

HTML Encoding (or "HTML Escaping") is the process of converting special characters into their "entity" equivalents. This is done to prevent a web browser from interpreting the characters as HTML code.

For example, if you want to display the text <h1> on your webpage (instead of a giant H1 header), you must encode it as &lt;h1&gt;. The browser renders this encoded text as the literal string <h1> that you intended.

This tool encodes the most common special characters:

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