HTML Entity Encoder / Decoder

Escape the characters that are special in HTML so text can be placed safely in a page, or convert entities such as & and © back into readable characters.

Loading the tool…

How it works

  • Encoding replaces & < > " ' and, optionally, every non-ASCII character with a numeric entity. Decoding understands the common named entities and all decimal and hexadecimal numeric entities.
  • Runs entirely in your browser: what you paste is not sent anywhere.

Assumptions and limits

  • Only about 55 of the most common named entities are decoded; unknown names are left unchanged and reported. Escaping output is one part of preventing cross-site scripting: always escape in the right context.

Frequently asked questions

Which characters must be escaped?

In HTML text, & and <. In attribute values, also the quote character used.

Related tools

Last reviewed 2026-10-28. More developer, web & seo tools tools. See the disclaimer.

Report a problem with this tool