Skip to content
QuicklyTools

HTML Entity Encoder

Escape text for safe use in HTML: minimal (&, <, >, quotes), all named entities, or all non-ASCII characters.

Runs in your browser
Loading tool…

About the HTML Entity Encoder

Escaping prevents text from being interpreted as HTML — essential when showing code samples or user content. Minimal mode escapes only the five characters that matter for safety; other modes convert special symbols to named entities (©, —) or numeric references for ASCII-only environments.

How to use it

  1. Choose the encoding mode.
  2. Paste your text or HTML.
  3. Copy the escaped output.

Good to know

  • For XSS protection, escaping must happen in the right context (HTML body, attribute, JavaScript, URL). Templating engines usually handle this automatically.

Frequently asked questions

Should I encode é as &eacute;?

Not usually. With UTF-8 pages, only &, <, > and quotes need escaping.

What's the difference between &#39; and &apos;?

Both represent an apostrophe; &#39; works in old HTML 4 browsers too.

More developer tools →