Toolyard

HTML Entity Encoder and Decoder

Common entities

How to encode or decode HTML entities

  1. Type or paste text into Input. With Encode, the output has &lt; for <, &gt; for >, &amp; for &, &quot; for " and &#39; for ', so it shows as text in a web page instead of being read as HTML.
  2. To also turn accented letters, symbols and other non-ASCII characters into entities, choose a name where there is one (&copy;, &euro;) or numbers for everything (&#169;, &#8364;).
  3. Switch Mode to Decode to turn entities, named or numeric, back into the characters they stand for. Copy output copies the result.

Frequently asked questions

What is an HTML entity?

A way to write a character in HTML with an ampersand, a name or number and a semicolon, such as &lt; for < or &#8364; for €. Browsers show the character, not the code.

Which characters must be encoded?

In text, < and & always; > is safest too. Inside attribute values, also the quote that wraps the value, " or '. Encoding all five, as this tool does, is safe everywhere.

Do I need entities for accents and other languages?

Not in a page saved as UTF-8, which nearly every page is today: é, ü, ñ, я or 東 can be written as they are. Entities for them help only in places that cannot carry UTF-8, such as some old email systems.

More developer tools