Escape and unescape HTML entities
Escaping is what stops user text from becoming markup. This tool handles the five characters that actually matter, and decodes named plus numeric entities on the way back.
- Files never leave your device
- No account, no queue
- Works offline
- No upload step
How it works
- 1
Choose escape or unescape
Escape converts the five special characters; unescape turns &-style entities back into characters.
- 2
Paste the text
Entities are converted as you type, including hex and decimal numeric forms.
- 3
Copy the result
The output is ready to paste into HTML, a template or a text field.
Frequently asked questions
Which characters get escaped?
& < > " and ’. Those are the five that can break out of text content or an attribute value. Escaping everything else produces unreadable markup with no security benefit.
Is this enough to prevent XSS?
For text and quoted attributes, yes. It is not enough for unquoted attributes, inside <script>, or in a URL context — those need context-specific escaping, which no generic entity tool can do for you.
Does it decode all HTML5 entities?
Named entities cover the common set plus any numeric form. The full HTML5 list has over 2000 names; the ones people actually meet are included, and unknown names are left untouched rather than guessed.
Why does & stay unchanged when I escape?
It does not — the & becomes &amp;. If you expected otherwise, you probably want unescape, which turns & into &.
Is the text uploaded?
No. It is a string replace in this tab.
Other tools
JSON formatter
Format, minify and validate JSON as you type, with the exact error position when it is malformed.
Base64 encoder
Encode and decode Base64 with correct UTF-8 handling, plus the URL-safe alphabet for tokens and filenames.
CSV to JSON
Turn a CSV export into a JSON array of objects — quoted fields, embedded commas and CRLF included.