HTML Entity Encoder / Decoder
Paste and it converts right away.
How to use
- Choose “Encode” or “Decode” and paste your text.
- Encoding replaces only the five characters & < > " ' by default. Choose “Also non-ASCII” when a legacy system needs every accented letter or emoji as a numeric entity.
- Decoding turns named entities such as © and numeric ones such as é back into characters.
Encoding <div class="a">Tom & "Jerry"</div> gives <div class="a">Tom & "Jerry"</div>. Decoding © < 😀 é gives © < 😀 é.
FAQ
Why do these characters need escaping?
< and & start tags and entities in HTML, so to show them as text you write < and &. Inserting user text into HTML without escaping breaks the page or opens it to script injection (XSS).
Why is the single quote '?
' did not exist in HTML 4, so some old browsers and email clients do not decode it. The numeric ' works everywhere.
Can decoding run scripts?
No. The browser’s HTML parser is used only inside a text box, so entities become characters while tags and scripts stay plain text.