HTML Entity Encoder & Decoder

Encode special characters to HTML entities or decode entities back to text.

Common HTML Entities

< → &lt;> → &gt;& → &amp;" → &quot;' → &apos; → &nbsp;© → &copy;® → &reg;™ → &trade;— → &mdash;
Learn more

How to Use

Paste HTML or text containing special characters into the input box. Click Encode to convert special characters (<, >, &, ", ') into their corresponding HTML entities, or click Decode to restore entities back to characters.

Why Encode HTML Entities?

HTML entity encoding prevents the browser from parsing special characters as markup. This is essential for displaying code snippets on web pages, preventing XSS attacks, and ensuring special characters render correctly in every browser.