HTML Entity Encoder

Runs in your browserDeveloper Tools#HTML#Web

Encode and decode HTML entities, and turn an email address into a spam-resistant mailto: link.

Characters to encode

Escapes & < > " ' so text shows as text inside HTML.

Entity style

&copy; where HTML has a common name, else &#169;

How to use, limits & privacy

About HTML Entity Encoder

Encode text into HTML entities and decode entities back to text as you type. Escape just the special characters (& < > " '), also encode accented letters, ₹ and emoji, or encode every character, using named, decimal or hex entities. The Email link option turns an email address into a mailto: link written entirely in entities, to keep it away from simple spam bots. It runs in your browser.

How to Use

1

Choose what to do

Encode to escape text for HTML, Decode to turn entities back into text, or Email link to protect an email address.

2

Pick the characters and style

Choose Special characters, + non-ASCII or Every character, and Named (&copy;), Decimal (&#169;) or Hex (&#xA9;) entities.

3

Type or paste

Type or paste into the left box, or click Example. The result appears as you type; Swap reverses it.

4

Copy the result

Click Copy. For Email link, copy the HTML and paste it into your page; the preview shows what visitors will click.

Privacy & Processing

  • Mode: local
  • Files Leave Browser: Local tool processing; review details below
  • Max Input Size: Device memory limits
  • Account Required: No
  • Data Stored Locally: Nothing is saved; your text is cleared when you close the page.
  • Network Processing: Assets or models may require an initial download

Text and email addresses are converted in your browser. Nothing is uploaded.

Rules & Limitations

  • Encoding works by Unicode character, so an emoji becomes one entity such as &#128512;, not two broken halves.
  • Named entities are used for the common HTML 4 names (&copy;, &eacute;, &rarr;); other characters fall back to numbers.
  • Decoding understands all HTML5 entity names and numbers. Tags in the input stay as text and are never run.
  • Email link only stops bots that read raw page code. Many harvesters decode entities, so it reduces spam rather than preventing it.

Top Suggestions

  • Showing HTML or code examples on a web page or blog
  • Escaping user text before putting it into HTML templates
  • Making ₹, accented names or emoji safe for older email templates
  • Reading text full of &amp; and &#39; from an API or a database
  • Publishing a contact email on a website with less spam

HTML Entity Encoder FAQ

How do I encode HTML entities?

Keep Encode selected and paste your text. With Special characters, & < > " and ' become &amp; &lt; &gt; &quot; and &#39;, which is what you need to show code or user text safely inside HTML.

How do I decode HTML entities like &amp; or &#39;?

Click Decode and paste the text. Named entities such as &nbsp; and &hearts;, and numeric ones such as &#8377; or &#x20B9;, turn back into the characters they stand for.

What is the difference between named, decimal and hex entities?

They mean the same character. Named entities like &copy; are easier to read; decimal (&#169;) and hex (&#xA9;) entities exist for every character, including ₹ and emoji, which have no common name.

How do I hide my email address from spam bots?

Choose Email link, enter your address and copy the HTML. Every character, including "mailto:", is written as an entity, so browsers show a normal link but simple bots that scan page code do not see the address. Determined harvesters can still decode it; a contact form hides it completely.

Do I need to encode characters like é or ₹ on a UTF-8 page?

Usually not: a page saved and served as UTF-8 can contain them directly. Encoding them helps in emails, old systems and places where the encoding is unknown.

Is my text uploaded?

No. Encoding and decoding happen in your browser and nothing is sent to a server or saved.