Handitab

HTML Encoder/Decoder

Convert special characters such as angle brackets, ampersands, and quotes into HTML entities, or decode entities back to plain text.

About HTML Encoder/Decoder

HTML entities are codes such as < and & that stand in for characters with a special meaning in HTML. Encoding here escapes five characters: ampersand, less-than, greater-than, double quote, and single quote. It can also turn each non-ASCII character into a numeric entity. Decoding handles all decimal and hexadecimal numeric entities and 15 common named ones, including nbsp, copy, and euro. Other named entities are left unchanged.

Also known as: HTML Entity Encoder.

How to use HTML Encoder/Decoder

  1. Type or paste into the "Input text" box, or press "Use example" to try it with sample data.
  2. Set "Direction" and "Also encode non-ASCII characters" if the defaults do not fit.
  3. The result appears below and updates as you type.
  4. Copy the result with the copy button, or download it as a file where that is offered.

Questions about HTML Encoder/Decoder

Which characters must be escaped in HTML?

At minimum the ampersand and the less-than sign in text, plus the quote character used around attribute values. Escaping all five (ampersand, both angle brackets, double and single quote) is the common safe default for untrusted text.

Runs in your browser. Page last updated .

More encoding and data tools

All 28 encoding and data tools