Developer tools

HTML entity encoder and decoder

Encode special characters to HTML entities or decode entities back to characters. Choose between named and numeric references.

  • Free, no sign-up
  • No data stored
  • Reviewed 2026-01-15

Your details

Direction

Results

About the HTML Entity Encoder/Decoder

Encode characters like <, >, &, " and ' to their HTML entity equivalents, or decode entity strings back to readable text. Choose between named (&) and numeric (&) references.

How to use the HTML Entity Encoder/Decoder

  1. Paste text or HTML.
  2. Choose direction: encode or decode.
  3. Select scope: minimal (< > & ") or full.
  4. View the result.

Frequently asked questions

When should I use HTML entities?

Whenever user-generated content is displayed in HTML to prevent XSS. At minimum, encode < > & and " characters.

What is the difference between named and numeric?

Named entities (&, <) are readable. Numeric (&, <) work for any Unicode character. Both render the same in browsers.

Does this handle all Unicode?

Yes. Full mode encodes all non-ASCII characters to numeric entities. Minimal mode only encodes HTML-special characters.