HTML Entity Encoder
Encode and decode & < > and friends.
Loading tool
Escape user-facing strings before they land in HTML, or decode a snippet you copied from a page source.
How to use this tool
- Paste your text. Put the draft or list into the field at the top of this page. Nothing is uploaded.
- Adjust the options. Pick the mode or flags you need. Results update in this tab.
- Copy the result. Use Copy when the output looks right. Refreshing the page clears the text.
What is escaped
& < > " and ' become named entities. Decode reverses named and numeric entities.
Frequently asked
Is this the same as URL encode?
No. Use the URL encoder for query strings.
Are Unicode characters touched?
Only if you enable numeric encoding for non-ASCII.
Can I decode ?
Yes.
Will this sanitize XSS?
Encoding helps in text nodes. It is not a full HTML sanitizer.
Is text uploaded?
No.