HTML Entities Encoder and Decoder

This tool converts text to HTML entities and back. Encode characters such as &, <, > and quotes so they show up as text on a web page instead of breaking your HTML, or decode entity codes like &eacute; and &#8364; into readable characters.

Everything runs in your browser. Nothing you enter is sent to or stored on our server.

Quick answer: HTML encoding replaces characters that have a special meaning in HTML with safe codes: & becomes &amp;, < becomes &lt;, > becomes &gt; and a double quote becomes &quot;. Paste text above and the encoded version appears instantly.

How to use the HTML entities converter

  1. Paste your text or HTML into the Input box. A sample line is loaded to show how it works.
  2. Choose Encode to turn characters into entities, or Decode to turn entities back into characters.
  3. When encoding, pick how much to convert: only the five HTML special characters, named characters like © and € as well, or every non-ASCII character as a numeric code.
  4. Click Copy output, or Swap to reverse the conversion.

Common HTML entities

CharacterNamed entityNumericDescription
&&amp;&#38;Ampersand
<&lt;&#60;Less than
>&gt;&#62;Greater than
"&quot;&#34;Double quote
'&apos;&#39;Apostrophe
(space)&nbsp;&#160;Non-breaking space
©&copy;&#169;Copyright
€&euro;&#8364;Euro sign
—&mdash;&#8212;Em dash
→&rarr;&#8594;Right arrow

When do you need to encode HTML?

  • Showing code on a page: to display a tag such as <div> as text in a blog post or tutorial.
  • User input: escaping text from forms before putting it into HTML stops it from breaking the page and helps prevent cross-site scripting (XSS). Use your framework’s built-in escaping in real apps.
  • Attributes: quotes inside an attribute value must be written as &quot;.
  • Email and old systems: numeric entities make sure accented letters and symbols survive systems that do not handle UTF-8.

Modern pages saved as UTF-8 can include characters like é or emoji directly, so you usually only need to encode the five special characters. For other encodings, see the URL encoder and Base64 encoder, or tidy data with the JSON formatter.

FAQ

What is the difference between named and numeric entities?

Named entities like &copy; are easier to read. Numeric ones like &#169; work for every Unicode character, including emoji, which have no names.

Is decoding safe?

Yes. Decoding happens in a text box, so no HTML or script you paste is run.

More free tools

See all of them on the QuickOnlineTips free online tools page and play our free online games.

Found this useful? Share it with someone who needs it.