Skip to content
LovTools
EN

HTML Entity Encoder

Escape or unescape HTML entities: <, >, &, quotes and special characters.

Processed locally on your device — nothing is uploaded.

About the HTML Entity Encoder

To show code examples on a web page, or to put user text safely into HTML, characters like < and & must be escaped so the browser treats them as text rather than markup. This encoder does that instantly.

Choose minimal mode for the five characters that matter for safety, or also convert accented letters and symbols to named entities (&eacute;) or numeric ones (&#233;) for systems that only accept ASCII.

How to use the HTML Entity Encoder

  1. Paste the text or HTML to escape.
  2. Choose an encoding mode.
  3. Copy the encoded result.

Features

  • Encode and decode
  • Named or numeric entities for non-ASCII
  • Emoji-safe numeric encoding
  • Output shown as text, never rendered
  • Live output

Supported formats

  • Plain text
  • HTML

Frequently asked questions

Is my code uploaded?

No. Formatting and minifying run in your browser, so proprietary code and secrets never leave your device.

Is escaping enough to prevent XSS?

Escaping is essential when inserting text into HTML content, but attributes, URLs and scripts each need context-specific handling in your code.

Added · Last reviewed · Maintained by Sohail Khax · How we test tools