About HTML Entity Encoder
When you want to show code or user text on a web page without the browser treating it as markup, the special characters need escaping. This encoder turns < into <, > into >, & into & and quotes into " and '.
Tick Encode non-ASCII characters to also convert accents, currency signs and emoji into numeric entities such as é, which helps with systems that only accept plain ASCII. Encoding happens in your browser and nothing is uploaded.
How to use it
- Paste the text or HTML snippet you want to escape.
- Keep Mode on Encode, and tick Encode non-ASCII characters if needed.
- Copy the escaped text from the right, or download it as a .txt file.
Frequently asked questions
Which characters are encoded?
By default the five that matter in HTML: &, <, >, the double quote and the apostrophe. With the non-ASCII option on, every character above the basic ASCII range is encoded as a numeric entity as well.
Is this enough to stop XSS?
Escaping these five characters makes text safe to place between tags and inside quoted attribute values. Other places, such as inside script tags or URLs, need their own escaping.
How do I turn entities back into characters?
Use the HTML entity decoder, which converts <, &, é and similar back to normal text.