HTML Encode

Escape <, >, &, ", and ' into named or numeric HTML entities.

Raw Text / Markup

Escaped HTML Entities

&lt;div class=&quot;alert&quot;&gt;Price &amp; Value: &quot;5 &lt; 10&quot;&lt;/div&gt;

How to Use HTML Encode

Safely turn code snippets or raw user strings into named (&lt;, &amp;, &quot;) or numeric (&#60;) HTML entities for embedding in web pages.

Step 1

Paste raw markup or text containing special characters.

Step 2

Select Named Entities or Numeric Entities mode.

Step 3

Click "Copy HTML Entities".

Network & Storage Note: Escaped locally in browser TypeScript.

What HTML Encode Includes

Escapes &, <, >, ", and '
Named or Numeric entity modes
SSR-safe pure encoder

Frequently Asked Questions

Frequently Asked Questions

Find quick answers about functionality, security, and usage limits.

Numeric entities like &#39; work even inside strict XML documents where HTML named entities other than the core five may not resolve.

More Developer & Format Tools

View all