Spincrus

Tools › HTML Entity Encoder & Decoder

HTML Entity Encoder & Decoder

Free online HTML entity encoder and decoder. Escape <, >, & and quotes, or decode &amp; &#169; &copy; back to text. Runs instantly.

Runs in your browser. Nothing is uploaded.

Use it from code

The same function is available as an API endpoint. Free tier: 200 calls per day without a key. Pro lifts the limit.

curl -X POST https://spincrus.uz/api/v1/tools/html-entities \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_KEY" \
  -d '{"text":"<p class=\"a\">Fish & Chips © 2026</p>","mode":"encode","asciiOnly":true}'

FAQ

Which characters must be escaped in HTML?

Always escape & and <. Escape > for readability, and " or ' when the text goes inside an attribute value. Escaping user input before putting it in a page is a basic defence against HTML injection.

What is the difference between named and numeric entities?

&copy; is a named entity, &#169; is decimal and &#xA9; is hexadecimal; all three produce the copyright sign. Numeric forms work for every Unicode character, while named ones exist only for a fixed list.

Does the decoder handle every named entity?

It handles all numeric entities and the most common named ones (&amp;, &lt;, &gt;, &quot;, &apos;, &nbsp;, &copy;, &euro;, arrows, quotes and more). Unknown names are left unchanged rather than guessed.

Related tools