HTML Entity Encoder & Decoder

Encode and decode HTML entities — free, with named or numeric (decimal/hex) output and optional full non-ASCII encoding. 100% in your browser.

100% private — runs entirely in your browser. Nothing you enter is uploaded or logged.

100% private — runs in your browser
Encode Decode

Only five characters strictly need escaping in HTML: & < > " '. Encoding runs locally — nothing is uploaded. Decoding handles double-encoded text if you run it twice.

How to use the HTML Entity Encoder & Decoder

  1. Choose encode or decode.
  2. Paste your text.
  3. Pick named or numeric entities (encode mode).
  4. Copy the result.

What you can use it for

  • Escape < > & so code shows as text
  • Decode &amp;-style entities back to characters
  • Fix double-encoded text
  • Display HTML snippets safely in a page

More free tools

Wrangling code or data?

Format, encode, hash and minify with our free developer tools — 100% in your browser.

Browse all free developer tools →

Frequently asked questions

How do I encode <, > and & for HTML?

Paste your text in encode mode and the tool escapes them to &lt;, &gt; and &amp; so they display as text instead of markup.

What's the difference between &amp;amp; and &amp;#38;?

Both represent an ampersand — &amp; is the named entity and &#38; is the numeric one; this tool can output either.

How do I decode double-encoded text?

Run the decoder twice — the first pass turns &amp;amp; into &amp;, the second into &.

How do I show code in HTML without it rendering?

Encode it first so the tags become entities, then paste the encoded version into your page.

Named or numeric entities — which should I use?

Named entities are more readable for the common characters; numeric entities work for any character, including emoji and other Unicode.