How to encode or decode HTML entities
- Choose Encode to escape text for HTML, or Decode to turn entities back into characters.
- Paste your text into Input.
- Copy the result.
Common uses
- Show code examples on a web page without the browser treating them as tags.
- Fix text that appears with literal
&or'in it. - Prepare text for HTML emails or older systems that only accept ASCII.
When to encode
- To show code on a web page, encode it: characters like
<and>would otherwise be read as HTML tags. Encoding turns them into<and>, so the code appears as text. - Quotes inside an attribute value need to be encoded as
"so they don’t end it early. - For plain-ASCII files and systems that only accept ASCII, Encode non-ASCII turns letters like é and symbols like © into numeric entities.
Decode does the reverse: paste HTML with entities and get readable text back.