CleverCat mascot: a cat engineer with a hard hatCleverCat.CC

Home / Developer tools / HTML Entity Encoder

HTML Entity Encoder

To show a tag on a page rather than have the browser run it, the angle brackets must become entities. This tool escapes the five characters that matter, optionally escapes accents too, and decodes in the other direction.

How to use it

  1. Paste your HTML or your entity-laden text.
  2. Tick the second box if the destination cannot handle UTF-8.
  3. Press encode or decode and copy the result.

Examples

Questions people ask

Which characters actually need escaping?

Ampersand, less-than and greater-than always. Quotes matter inside attribute values, where an unescaped quote ends the attribute early. Everything else is optional if the page is served as UTF-8, which it should be.

Does escaping prevent cross-site scripting?

It is the main defence, but context decides. Escaping for HTML text is not the same as escaping for a JavaScript string, a URL or a CSS value. Use your framework's context-aware escaping in production code rather than a manual pass.

Related tools

Updated: 2026-08-07