HTML Entity Encoder and Decoder

Escape special characters as HTML entities or decode entity references into readable text.

Input

HTML entity conversion

Escape the characters that have special meaning in HTML, or decode named and numeric entities.

Result

The result stays plain text. It is never interpreted as markup.

Enter text, then choose Encode or Decode.

Runs in your browser. Nothing is uploaded.

Also known as: escape html, unescape html, encode html characters

How to use

  1. Paste text or existing HTML references.
  2. Choose Encode or Decode. When encoding, decide whether to convert non-ASCII characters too.
  3. Copy the plain-text result.

Frequently asked questions

Which characters does basic escaping cover?

Ampersands, angle brackets, and both kinds of quote marks.

Which references can be decoded?

Named HTML references and decimal or hexadecimal numeric references ending in a semicolon.

Does decoding run HTML tags?

No. The decoded string is displayed as plain text.

Is escaping the same as sanitizing HTML?

No. The correct escaping rules depend on where a value is used. Do not use this as a substitute for an HTML sanitizer.