HTML Encoder Decoder

Encode and decode HTML entities.

Input
Output
Input
Output
Advertisement

Encode and decode HTML entities instantly. This developer tool handles text conversion entirely client-side in your browser.

How to use it

  1. Paste the text or HTML snippet into the input box.
  2. Choose whether to encode it or decode it.
  3. Copy the result into your page or template.

Frequently asked questions

Why do I need HTML entities?

Because a raw < or & is read as markup. Escaping it makes the browser display the character instead of trying to interpret it as a tag.

Does escaping prevent XSS?

It is the core defence for text placed into a page, but context matters: attribute values, URLs and inline scripts each need their own escaping rules.

Which characters must be escaped?

At a minimum the ampersand, the angle brackets and, inside attributes, single and double quotes.

Recommended Tools