T-38 · Developer tools

HTML Entity Encoder and Decoder

Escape text for HTML with entities such as < and &, or decode named, decimal and hex entities back to text. Safe, local and instant.

  • Runs in your browser
  • Nothing uploaded
  • No account
Instrument T-38 · HTML Encode / DecodeLocal
Mode
Characters

39 → 65 characters

About this instrument

What it does

Encode special characters so text can be placed safely inside HTML, or decode entities like ©, é, é and é back to readable text. Decoding is done with a lookup table rather than by parsing HTML, so pasted markup is never rendered or run.

How to use it

  1. Choose Encode or Decode.
  2. When encoding, choose whether to escape only & < > " ' or every non-ASCII character too.
  3. Paste your text and copy the result.

FAQ

Common questions.

01Which characters must be escaped in HTML?

& and < in text, plus " or ' inside attribute values. Escaping > as well is common and harmless.

02Does encoding prevent XSS?

Escaping & < > " ' protects text placed in HTML content and quoted attributes. It is not enough for URLs, JavaScript or CSS contexts, which need their own escaping.

03What is the difference between &#233; and &eacute;?

None in the result: both are “é”. Numeric entities work for any Unicode character; named ones exist only for a fixed list.