Your text
Type or paste something to encode or decode.
How to
Escape or decode in three steps
- Paste your text Plain text or HTML to escape, or text containing entities such as & or é to decode.
- Choose encode or decode Encoding escapes & < > and both kinds of quote. Tick the box to turn every non-ASCII character into a numeric entity too.
- Copy the result Any entity the tool does not know is left as it was and listed, so nothing is silently changed.
When entities matter
- Always escape user-supplied text before putting it in HTML. Unescaped < and & are how markup injection starts.
- Escaping is for the place the text goes: HTML text, an attribute, a URL and a script each need different handling.
- Decode only once. Decoding < gives <, not <, which is the correct result.
- A UTF-8 page can hold accented letters and emoji directly; numeric entities are mainly for old systems.
FAQ
HTML entities questions
What is an HTML entity?
A way to write a character using ASCII only, such as < for <, & for & or é for é.
Which characters must be escaped in HTML?
At least & and <. Quotes matter inside attribute values, and > is escaped by convention. This tool escapes all five.
What is the difference between é and é?
Both mean é. The first uses the decimal code point, the second the hexadecimal one.
Why was an entity not decoded?
It is not one of the named entities this tool knows, or the number is not a valid character. It is left unchanged and listed.
Is the text rendered as HTML anywhere?
No. It is shown as plain text only, so pasted markup cannot run.