HTML entity encoder and decoder
Escape special characters as HTML entities, or decode entities back to text.
🔒 Everything runs in your browser. Nothing you choose or type is uploaded. How to verify
How to use it
- Paste your text or HTML.
- Choose encode, encode all non-ASCII or decode.
- Select Run and copy the result.
Handy for
Showing code samples on web pages and cleaning scraped text.
Good to know
Escape text before placing it inside HTML to prevent it from being read as markup.
Privacy: where the work happens
Everything you enter or choose is processed by JavaScript in your browser and never sent anywhere. Only the page code, and any library this tool needs, is downloaded from cdnjs or jsDelivr.
Questions
Which characters are encoded?
Ampersand, less-than, greater-than and both kinds of quotes. The extra mode also converts every non-ASCII character to a numeric entity.
Does decoding run any code?
No. Entities are decoded as plain text, and tags are never executed.