HTML Entity Encoder / Decoder

Convert special characters like & < > & and accented letters into safe HTML entities, or decode them back to plain text. Runs in your browser.

Input

Result

Private by design. Encoding and decoding happen entirely in your browser. Nothing you paste is sent anywhere.

How HTML entities work

Why encode?

Characters like &, < and > have special meaning in HTML. If they appear literally in your content — for example in a code snippet, a product description or a user comment — they must be replaced with named entities (&amp;, &lt;, &gt;) or numeric entities (&#38;, &#60;, &#62;) to avoid the browser misinterpreting your markup.

Named vs numeric entities

This encoder uses named entities where they exist (&amp;, &lt;, &gt;, &quot;, &apos;) and decimal numeric entities for every other character, including accented letters, emoji and symbols. The decoder recognises both forms and converts them back to the original characters.

Encoding mode

Paste plain text and click "Run". Every special character is converted. Characters that do not need encoding (alphanumeric and basic punctuation) are left as-is so the output stays readable.

Decoding mode

Paste a string containing HTML entities and click "Run". All named and numeric entities are converted back to their character equivalents.

How to use the HTML Entity Encoder / Decoder

  1. Paste text to encode, or entities to decode.
  2. The other box updates automatically.
  3. Copy the result.

Frequently asked questions

What are named entities?

Symbols such as those for ampersand and copyright that represent characters, which the tool produces alongside numeric forms.

Why encode HTML entities?

Encoding stops characters like the less-than sign and ampersand from being interpreted as markup when you display them.

Is my text uploaded?

No. Encoding and decoding run in your browser.