Skip to content
ToolsFort home

HTML Entity Encoder / Decoder

HTML entity encoder and decoder: escape special characters to entities, or decode named and numeric entities back to text.

Updated

Mode
0 chars
0 chars

Show HTML code as text on a web page, escape user content, or turn &-filled text back into readable characters.

How to use the HTML Entity Encoder / Decoder

  1. 1 Choose Encode or Decode.
  2. 2 Paste your HTML or text.
  3. 3 Copy the result.

Worked examples

Encode

Input: <p class="note">Fish & Chips</p>

Result: &lt;p class=&quot;note&quot;&gt;Fish &amp; Chips&lt;/p&gt;

Decode

Input: &copy; 2026 &mdash; caf&eacute;

Result: © 2026 — café

Named entities

Which characters must be escaped?

Character Entity
& &amp;
< &lt;
> &gt;
" &quot;
' &#39;

Escaping these five prevents text from being interpreted as markup — the core defence against cross-site scripting (XSS) when inserting user content into HTML.

Encoding all non-ASCII characters

Modern pages served as UTF-8 do not need accented letters or emoji encoded, but some email templates and legacy systems do. Tick "Encode all non-ASCII" to output numeric entities such as &#233;.

Runs locally

Everything happens in your browser — nothing you paste is uploaded or logged, so it is safe to use with API responses, tokens and internal data.

Frequently asked questions

What is an HTML entity?

A text code that represents a character, such as < for < or © for ©.

Is decoding safe?

Yes. Decoding happens in an isolated element that never executes scripts or loads resources.

Named or numeric entities?

Both are decoded. Encoding uses the five essential named entities plus numeric codes for non-ASCII when selected.

Esc