HTML Encoder

Convert all applicable characters to HTML entities, or vice versa

Tags: decoder encoder html html encode/decode

Introduction

This online HTML encoder tool helps you convert characters into HTML entities. It’s a simple and efficient way to handle reserved or special characters in your HTML code.

How to Use This Tool

  1. Paste your HTML code directly into the editor or type it in.
  2. Click the Encode or Decode button to process your HTML.
  3. After encoding or decoding, you can:
    • Download the processed result.
    • Save or share it using a unique link.
    • Sign in with Google or GitHub to save your results for future use.

What is an HTML Entity?

An HTML entity is a piece of text that starts with an ampersand (&) and ends with a semicolon (;). Entities are commonly used to display reserved characters, like < or >, which would otherwise be interpreted as HTML code. They can also represent invisible characters (e.g., non-breaking spaces) or special characters that are difficult to type on a standard keyboard.

For example:

  • < represents the less-than symbol ("<").
  • & represents the ampersand ("&").

Learn more about HTML entities from this helpful guide .

Some Useful HTML Character Entities

Result Description Entity Name Entity Number
non-breaking space &nbsp; &#160;
< less than &lt; &#60;
> greater than &gt; &#62;
& ampersand &amp; &#38;
" double quotation mark &quot; &#34;
' single quotation mark (apostrophe) &apos; &#39;
¢ cent &cent; &#162;
£ pound &pound; &#163;
¥ yen &yen; &#165;
euro &euro; &#8364;
© copyright &copy; &#169;
® registered trademark &reg; &#174;

Examples

Before encoded

      
<!doctype html>
<html lang="en">
  <head>
    <title>Hello World!</title>
  </head>
  <body>
    <div id="content">
      <h1 class="title">Hello World!</h1>
    </div>
  </body>
</html>
      
    

After encoded

      
&lt;!doctype html&gt;
&lt;html lang=&quot;en&quot;&gt;
  &lt;head&gt;
    &lt;title&gt;Hello World!&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
    &lt;div id=&quot;content&quot;&gt;
      &lt;h1 class=&quot;title&quot;&gt;Hello World!&lt;/h1&gt;
    &lt;/div&gt;
  &lt;/body&gt;
&lt;/html&gt;