HTML Entity Encoder / Decoder

Escape and unescape HTML characters.

Escape HTML so it shows as text on a page, or turn entities back into normal characters.

🔒 Converted in your browser.

How to use the html entity encoder / decoder

  1. Type or paste in the top box to encode.
  2. Or paste entities in the bottom box to decode.
  3. Copy the result.

When you need it

To show code samples in a blog post, to put special characters in HTML attributes, and to read text exported from a database that is full of ampersand codes.

Frequently asked questions

Which characters must be escaped?

At minimum the ampersand, the two angle brackets, and quotes inside attributes.

What is a non-breaking space (nbsp)?

An entity that decodes to a space which never wraps onto a new line.

Does it handle emoji?

Yes – tick the option to encode them as numeric entities.

Guides

Related free tools

See all 147 free tools →