HTML Encoder

Encode and decode HTML entities

About HTML Encoder

HTML Encoder converts the five characters that matter for safe HTML output — &, <, >, quote, and apostrophe — into their HTML entities, entirely in your browser using simple text replacement. Decoding reverses exactly those same five entities; other named entities like a non-breaking space or copyright symbol aren't produced or recognized by this tool.

How to use HTML Encoder

  1. 1Paste or type text into the input box.
  2. 2Click 'Encode' to convert & < > " ' into HTML entities, or 'Decode' to convert those five entities back.
  3. 3Review the result in the output box.
  4. 4Click 'Copy' to copy it to your clipboard.

Frequently Asked Questions

Which characters does it encode?

Ampersand, less-than, greater-than, double quote, and apostrophe — the characters that matter for safely embedding text in HTML.

Is HTML Encoder free to use?

Yes, it's completely free with no signup required.

Does Decode handle entities like &nbsp; or &copy;?

No — it only reverses the same five entities this tool's own Encode produces. Named entities beyond those five aren't recognized.

Is my data uploaded to a server?

No, encoding and decoding both happen entirely in your browser.

Tips & Tricks

  • Encoding these five characters is exactly what's needed to safely place untrusted text inside HTML markup, preventing it from being interpreted as tags or breaking out of an attribute.
  • For decoding a broader range of named or numeric HTML entities (like &nbsp; or &#8364;), you'll need a more complete decoder than this tool's Decode button.
  • Encode text before inserting it into an HTML attribute value to avoid breaking the surrounding quotes.
  • Keep a copy of your original text, since encoding and decoding overwrite the output box each time.