Explosion Tools

HTML Entity Encoder / Decoder

Encode and decode HTML entities like & < > ". Free, no signup, works in your browser.

Output will appear here…

All encoding/decoding happens in your browser. No data is sent to any server.

About HTML Entity Encoder / Decoder

This tool converts special characters like <, >, &, and " into their HTML entity equivalents (&lt; &gt; &amp; &quot;) and back. Encoding prevents browsers from interpreting characters as HTML tags, which is essential for displaying code snippets, preventing XSS attacks, and sanitizing user input. The decoder converts encoded entities back to readable text. Supports all named HTML entities and numeric character references.

Frequently Asked Questions

What characters does the encoder convert?
The encoder converts the five characters that have special meaning in HTML: & (ampersand), < (less than), > (greater than), " (double quote), and ' (single quote/apostrophe).
Why do I need to encode HTML entities?
Without encoding, browsers interpret characters like < and > as HTML tags. This can break page layouts and create security vulnerabilities (XSS). Encoding ensures the characters display as plain text.
Does the decoder support named and numeric entities?
Yes. The decoder handles all named entities (like &amp;, &copy;, &mdash;) and numeric entities (like &#169;, &#x00A9;) supported by your browser.

Related Tools