MinifyPic

HTML Entity Converter

Escape angle brackets, ampersands and quotes into HTML entities — and decode the & soup back into readable text.

FreeBoth directionsInstant
Loading tool…

How it works

A compact workflow from input to download.

1

Paste your text or HTML

Enter the text you want to escape, or the entity-riddled text you want to decode.

2

Encode or decode

Choose which direction you need.

3

Copy the result

Copy the escaped or unescaped output.

Frequently asked questions

Which characters must be escaped in HTML?
The critical ones are the ampersand, which must always become & because it begins an entity; the less-than and greater-than signs, which begin and end tags; and the double and single quote when text is being placed inside an attribute value, where an unescaped quote would close the attribute early.
Why is escaping a security issue?
Because unescaped user input is the mechanism behind cross-site scripting. If someone types a script tag into a comment box and your page renders it literally, the browser executes it — in your visitors' sessions, with their cookies. Escaping turns those angle brackets into entities that display as text rather than being parsed as markup, which is the difference between showing a script and running one.
Why do I sometimes see & in the wild?
That is double escaping: text was escaped, and then the already-escaped result was escaped again, so the ampersand in & became &. It is the entity equivalent of double URL-encoding, and it happens when several layers each helpfully escape the same string. The fix is to escape exactly once, at the point of output.
Is my data sent to a server?
No. Everything runs in JavaScript inside your own browser tab — nothing is uploaded, logged or stored. That is what makes it safe to paste in API responses, config files, tokens and other material you could not send to a third-party service.

Escaping is the front line against XSS

Cross-site scripting has sat near the top of the web's vulnerability rankings for two decades, and at its root it is an escaping failure. The pattern never varies: an application takes text from a user, inserts it into a page without escaping, and the browser — which cannot distinguish content the author wrote from content an attacker submitted — parses the attacker's angle brackets as real markup and runs their script. From there the attacker can read cookies, hijack sessions, rewrite the page and exfiltrate data, all under your domain's authority. The defence is deceptively simple: escape user input when you render it. Modern frameworks do this by default precisely because getting it wrong is so common and so damaging, and the dangerous constructs are the ones that explicitly opt out of it.

Escape at output, not at input

A subtle but important point about where escaping belongs. It is tempting to escape data as it arrives and store the escaped version, which feels safe. It is not: you now have a database full of & entities that are wrong in every context that is not HTML — your emails, your CSV exports, your JSON API and your search index all contain garbage. Worse, someone will inevitably escape it again on the way out, producing the double-escaping soup. The correct discipline is to store data exactly as the user typed it, and escape at the moment of rendering, using the escaping appropriate to the destination — HTML entities for a web page, backslashes for a JSON string, percent-encoding for a URL. The escaping depends on where the data is going, which is why it belongs at the output boundary.