HTML Encode / Escape

Replace < > & " ' and optionally non-ASCII characters with their HTML entity equivalents. Safe, private, in your browser.

Plain text / HTML
Encoded HTML

Need to scan documents to real PDFs?

Offline PDF Scanner turns your phone camera into a real PDF scanner — with searchable text, not just photos. Works completely offline.

What is HTML encoding?

HTML encoding (escaping) replaces characters that would otherwise be interpreted as markup with their named or numeric entity equivalents. The five characters that absolutely must be encoded when inserting user text into HTML are: <&lt;, >&gt;, &&amp;, "&quot;, '&#39;. Encoding also blocks the most common form of cross-site scripting (XSS) attacks.

How to use

  1. Paste your text into the left panel.
  2. Pick Minimal (just the five risky characters) or All non-ASCII (also encodes every Unicode character above code point 127).
  3. Enable numeric entities if your target expects &#60; form instead of named entities.
  4. Click Encode →, then Copy or Download.

When to encode

  • Displaying user-submitted content inside an HTML page.
  • Embedding plain text inside <title>, attribute values, or alt text.
  • Generating email bodies or RSS feeds that must be XML-safe.
  • Preserving code samples and diagrams inside HTML content.

Privacy

All encoding happens in your browser. Nothing is uploaded — especially important when the input contains HTML with personal data.

Frequently Asked Questions