HTML Entities Encoder / Decoder

Escape unsafe HTML characters into entities and decode entities back to characters. Useful for safely embedding user content in HTML.

Processed in your browserNo upload, no signup

Text

0 lines · 0 chars

Escaped

0 lines · 0 bytes
Your input is processed locally and isn't uploaded for processing. Verify by opening DevTools → Network — there are no requests carrying your data.

HTML Entities Encoder / Decoder examples.

// Escape HTML

<a href="x">Tom & Jerry</a>
&lt;a href=&quot;x&quot;&gt;Tom &amp; Jerry&lt;/a&gt;

// Unescape entities

&lt;a href=&quot;x&quot;&gt;Tom &amp; Jerry&lt;/a&gt;
<a href="x">Tom & Jerry</a>

Frequently asked questions.

Is HTML escaping the same as XSS protection?

No. Escaping makes text safe to put inside an HTML document, but it does not protect against every XSS vector. Use a sanitizer like DOMPurify when rendering untrusted HTML.

Which characters are escaped?

<, >, &, ", and ' are escaped to their named or numeric entity equivalents.

Is my text uploaded?

No. Encoding and decoding happen in your browser.

Related tools.