HTML Entity Encoder
Replace the five characters that carry special meaning in HTML — & < > " and ' — with entities, so code snippets are displayed as text instead of being parsed as tags. Chinese, Japanese, and emoji are left alone, which keeps the output readable.
How to use
- Paste markup, a template snippet, or text containing quotes.
- Only & < > " ' are replaced with entities; everything else stays as it is.
- Paste the result into a page or template and check that it shows as literal text.
FAQ
Why are Chinese characters not converted?
Only the five characters that are meaningful in HTML are escaped. Chinese text does not need escaping, and leaving it readable is more useful.
What is the difference between ' and '?
Both represent a single quote. ' is not supported by every older HTML parser, so this tool outputs '.
Does escaping prevent XSS?
No. Escaping makes text display as text; it does not replace context-aware output encoding and input filtering.
Further reading