ZeroUtil

HTML Entity Encode / Decode

Encode special characters to HTML entities or decode them back.

How to Use the HTML Entity Encoder/Decoder

Select Encode to convert special characters like <, >, &, " and ' into their HTML entity equivalents. Select Decode to convert HTML entities back to readable characters.

Encoding Options

By default the encoder converts only the five core HTML special characters. Enable "Encode all non-ASCII characters" to also convert accented letters, symbols and emoji to numeric entities — useful when your document must stay pure ASCII.

Live Output

Results update instantly as you type. Use the Swap button to send the output back as input and flip the mode, which is handy for round-trip testing.

Frequently Asked Questions

Which characters are encoded by default?

The five HTML special characters: & (&amp;amp;), < (&amp;lt;), > (&amp;gt;), " (&amp;quot;) and ' (&amp;#39;). Enable the non-ASCII option to encode everything above code point 127.

Does this decode named entities like &amp;copy; and &amp;euro;?

Yes. The decoder handles named entities (e.g. &amp;copy;, &amp;euro;, &amp;mdash;), decimal numeric entities (e.g. &amp;#169;) and hexadecimal numeric entities (e.g. &amp;#xA9;).

Is my data sent to a server?

No. All encoding and decoding happens entirely in your browser. No data leaves your device.

Can I use this for XML escaping?

Yes. The five default entities (&amp;amp;, &amp;lt;, &amp;gt;, &amp;quot;, &amp;#39;) are the same ones required for valid XML, so the encoder works for XML too.

What is the difference between HTML encoding and URL encoding?

HTML encoding converts characters to HTML entities for safe display inside HTML documents. URL encoding (percent-encoding) converts characters to %XX sequences for safe use in URLs. They solve different problems.

Ad

More Developer Tools