Escape the characters that are special in HTML so text can be placed safely in a page, or convert entities such as & and © back into readable characters.
Loading the tool…
How it works
- Encoding replaces & < > " ' and, optionally, every non-ASCII character with a numeric entity. Decoding understands the common named entities and all decimal and hexadecimal numeric entities.
- Runs entirely in your browser: what you paste is not sent anywhere.
Assumptions and limits
- Only about 55 of the most common named entities are decoded; unknown names are left unchanged and reported. Escaping output is one part of preventing cross-site scripting: always escape in the right context.
Frequently asked questions
Which characters must be escaped?
In HTML text, & and <. In attribute values, also the quote character used.