DengWoLai DengWoLai
Dev · DengWoLai

HTML Escape / Unescape (Prevent XSS)

HTML escape converts characters like < and & into entities so they display as text instead of being interpreted as markup. It is a display fix, not a complete XSS defence.

Runs locally · files stay on device · works offline

How it works in 4 steps

  1. 1

    Pick or drop

    Select or drag files into the card — loaded directly into local memory.

  2. 2

    Set options

    Adjust target KB, format, dimensions or filters with instant feedback.

  3. 3

    Process locally

    Canvas, WebAssembly, or Web Crypto completes the job on your device.

  4. 4

    Save result

    Download directly; close the tab to clear everything from memory.

When to use this

Scenario Recommended Why
Showing a code snippet on a page HTML Escape Tags display as text instead of being parsed
Storing user input for later display HTML Escape Stops markup injection at render time
Blocking XSS properly Use context-aware escaping HTML escaping alone is not enough in attributes or script blocks

Privacy & Offline Guarantee

Ready to use with zero installation or login. Once loaded once, core dependencies cache locally so the tool works offline.

FAQ

Does escaping prevent XSS?

In HTML text context, mostly yes. But attributes, JavaScript strings, CSS and URLs each need their own escaping — one function cannot cover all five contexts.

Which entities are escaped?

At minimum &, <, >, " and '. Missing the quote entities is the classic bug that lets an attribute break out of its value.

Is my input uploaded?

No — replacement is done with string operations in your browser.

Something failed, or you wish this tool also did something else? Tell me →

Related Tools

Dev
Image to Base64
Turn an image into a data URI, with size comparison.
Local only →
Dev
URL Encoder / Decoder
Percent-encode URLs — see both encoder variants.
Local only →
Dev
JSON to YAML and Back
Convert between JSON and YAML — config never uploaded.
Local only →
Dev
UUID Generator — v4 and v7
Generate UUID v4 or v7 in bulk — cryptographically random.
Local only →

Ready to process your files privately?

Back to tool ↑