HTML Encode

Encode special characters to HTML entities

How to use

  1. Paste text or HTML you want to escape.
  2. Special characters are converted to HTML entities.
  3. Copy the safe output to embed in a page.

Why use this tool

Frequently asked questions

When should I HTML-encode?

Whenever you want to display characters like < or & as literal text rather than have the browser interpret them as markup.

Does this prevent XSS?

Encoding output is a key part of preventing XSS, but full protection depends on context and proper handling throughout your app.

Is my text private?

Yes. Encoding runs in your browser.

Back to all tools