HTML Encoder

Encode and decode HTML special characters for safe embedding.

Input
Output
Encode: chars Decode: chars

Quick Examples

Character Reference

&&
<&lt;
>&gt;
"&quot;
'&apos;
&&amp;
&nbsp;
©&copy;
®&reg;
&trade;
<3&lt;3
¢&cent;
', style: '', quotes: 'He said "Hello" and \'Hi\'', ampersand: 'Tom & Jerry are friends' }; this.input = examples[type] || ''; this.encode(); }, clearAll() { this.input = ''; this.output = ''; }, copyOutput() { navigator.clipboard.writeText(this.output); } }; }