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;), < (&lt;), > (&gt;), " (&quot;) and ' (&#39;). Enable the non-ASCII option to encode everything above code point 127.
Does this decode named entities like &copy; and &euro;?
Yes. The decoder handles named entities (e.g. &copy;, &euro;, &mdash;), decimal numeric entities (e.g. &#169;) and hexadecimal numeric entities (e.g. &#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;, &lt;, &gt;, &quot;, &#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.
More Developer Tools
JSON Formatter
Format, validate and minify JSON with syntax highlighting.
Open tool →Base64 Encode / Decode
Encode text to Base64 or decode Base64 back to text.
Open tool →UUID Generator
Generate UUID v4 identifiers, single or in bulk.
Open tool →Unix Timestamp Converter
Convert Unix timestamps to human-readable dates and back.
Open tool →URL Encode / Decode
Encode or decode URLs and query parameters.
Open tool →JWT Decoder
Decode and inspect JWT tokens — header, payload and claims.
Open tool →