Servinza logoservinza / tools

HTML Entity Encoder and Decoder

Convert special characters to and from HTML entities like &. Free to use, no signup required for occasional use.

Result will appear here…

What is the HTML Entity Encoder/Decoder?

The HTML Entity Encoder/Decoder converts characters with special meaning in HTML — such as <, >, &, and quotes — into their safe entity equivalents (&lt;, &gt;, &amp;, &quot;), and can reverse the process to decode entity-encoded text back into readable characters, including numeric entities. This matters whenever user-generated or dynamic text is inserted into HTML markup, since unescaped special characters can break page structure or open the door to injection issues. Developers use it to sanity-check how a string will render, or to clean up text copied from a CMS or API response full of encoded entities.

How to use it

Choose Encode or Decode, paste your text, and the result updates instantly. Encoding is useful before inserting user text into raw HTML; decoding is useful for turning entity-heavy text — like content pulled from an RSS feed or scraped page — back into normal readable text.

Frequently asked questions

Which characters get encoded?

The core HTML-unsafe characters: &, <, >, double quotes, and single quotes.

Does decoding support numeric entities like &#39;?

Yes, both decimal (&#39;) and hexadecimal (&#x27;) numeric entities are decoded, along with the common named entities.

Is this the same as URL encoding?

No, HTML entity encoding and URL/percent-encoding solve different problems and use different formats.

Related tools