HTML Entity Encode/Decode

Runs entirely in your browser — never uploaded

Escape or unescape HTML entities in text.

0 characters
0 characters

Frequently asked questions

Why escape HTML entities?

So text containing characters like <, > and & displays literally instead of being interpreted as HTML markup — important when rendering user-submitted text safely on a web page.

Which characters get escaped?

The five predefined XML/HTML entities: &, <, >, " and ' become &amp;, &lt;, &gt;, &quot; and &#39;.

Does this handle numeric character references like &#65;?

Unescaping does — the browser’s built-in decoder resolves both named entities (&) and numeric references (&) to their character.

Should I escape entities before or after inserting user text into HTML?

Always escape immediately before inserting untrusted text into HTML markup — that’s what prevents it from being interpreted as tags.