HTML Entity Converter

Escape or unescape HTML entities — keep code visible and safe. Convert text to HTML entities or decode entities back to plain text. Escape &, <, >, quotes and non-ASCII characters. Free online HTML encoder.

This tool runs 100% in your browser. Your input is never sent to any server — you can even go offline after the page loads.

About the HTML Entity Converter

If you paste raw code into a web page, the browser tries to render it — turning your example snippet into a broken layout. Escaping converts characters like &lt; and &amp; into safe entities so they display literally, and it is the first line of defence against accidental HTML injection in user content. This converter escapes only what is necessary (or everything, including non-ASCII, for maximum portability) and decodes existing entities back to readable text.

How to use the HTML Entity Converter

  1. Paste the text or HTML you want to convert.
  2. Click Encode to escape, or Decode to unescape.
  3. Toggle full escaping if you need non-ASCII covered.
  4. Copy the entity-safe result.

Key features

Which characters must always be escaped in HTML?
The ampersand (&), less-than (<) and greater-than (>) must be escaped whenever they are not part of real markup; quotes matter inside attribute values.
What do &amp;nbsp; and numeric entities mean?
Named entities like &nbsp; are readable aliases; numeric ones like &#8212; refer to unicode code points directly. This tool decodes both.

Related Developer Tools tools

More utilities from the same category.

View all →