MewTools

EncodingTool 10

HTML Entity Encoder

Stop stray angle brackets and quotes from breaking your markup by escaping them before you paste.

Runs locallyNo uploadText or HTMLFree, no account

HTML Entity Encoder

72 / 232

Result

Waiting

Run the tool and the result appears here. Copy it or download it — nothing leaves this tab.

Privacy

Local by design

Everything you type stays in this tab and is processed by JavaScript on your device. Nothing is uploaded, logged or stored on a server.

How to use it

01

Add text or html in the field above. Nothing is uploaded while you type.

02

Press “Escape HTML”. The escaped html appears in the result panel instantly.

03

Copy the escaped html or download the file, then close the tab.

When to use it

Code samples

Show literal HTML tags inside a tutorial without the browser rendering them.

User-generated content

Prepare text for a template that inserts raw values into attributes.

Debugging markup

Check which characters in a snippet actually need escaping.

Questions

Which characters are escaped?

Ampersand, less than, greater than, double quote and apostrophe. Other characters pass through unchanged.

Is this the same as URL encoding?

No. HTML escaping protects markup; percent encoding protects URLs. Use the URL encoder for query strings.

Does this tool upload my data?

No. Everything runs in this browser tab with JavaScript, so text or html never leaves your device.

When should text be escaped before it goes into HTML?

Whenever the text is not markup: user comments, code samples, form values echoed into a page. Escaping the ampersand and angle brackets stops the browser from treating the content as tags, which is both a rendering and a security fix.

Why does escaping a template variable twice break it?

The second pass escapes the ampersand of the first pass, so & becomes & and the page shows the entity text instead of the character. Escape once, at the point the value is inserted into HTML.

↑↓ to move↵ to openEsc to close