1. Home
  2. Code
  3. HTML Entity Encode / Decode

HTML Entity Encode / Decode

Escape text so it shows as-is inside HTML, or decode named and numeric entities back to characters.

Runs in your browser Free, no sign-up

Which characters are escaped

Encode replaces the five characters that HTML treats as markup: ampersand, less than, greater than, double quote and single quote. That is enough for text and attribute values. With non-ASCII on, letters such as ç or emoji become numeric references too, which helps when a file or an e-mail is not stored as UTF-8. Decode understands named, decimal and hexadecimal entities.