Nifty Dev Tools
  1. Home
  2. HTML Entities
Encode / Decode

HTML Entity Encoder & Decoder

We never upload what you paste ✨

Make text safe to put inside HTML, or turn entities like & back into characters.

Text to escape
Escaped HTML

The escaped HTML will appear here as you type.

What are HTML entities?

Some characters have a meaning in HTML: < starts a tag and & starts an entity. To show them as text, they are written as entities like &lt; and &amp;. Entities can also write characters by number, like &#233; for é.

How to use it

  1. Encode escapes text so it's safe to put inside HTML. & < > " ' are always escaped; turn on Non-ASCII too to escape accents, symbols and emoji as well (named where a well-known name exists, numeric otherwise).
  2. Decode turns every HTML5 entity back into its character. Entities that don't exist are kept as written and listed under the input.

Example

<p>Tom & Jerry's café 👋</p>
&lt;p&gt;Tom &amp; Jerry&#39;s café 👋&lt;/p&gt;

With Non-ASCII too, café 👋 becomes caf&eacute; &#128075;.

Named or numeric?

Styleé'Notes
Named&eacute;&#39;Easier to read. ' has no name in older HTML, so it stays numeric
Numeric&#233;&#39;Works everywhere, including XML

Security note

Escaping & < > " ' makes text safe inside HTML text and quoted attributes. It is not enough inside <script>, inline event handlers (onclick="…"), CSS or URLs (href="javascript:…"): each of those needs its own escaping. Use your framework's built-in escaping wherever you can.

FAQ

Is it safe to decode HTML here?

Yes. Decoding only turns entities into characters and the result is always shown as plain text, so pasted <script> or <img onerror> never runs.

Is my text uploaded?

No. Everything happens in your browser. See the privacy page.