HTML Encoder / Decoder

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

About HTML Encoding

HTML encoding replaces characters like <, >, and & with entity codes so they display as text instead of being interpreted as HTML. Decoding does the reverse. Use encoding when embedding user input or code in HTML to avoid security issues and display problems.

Frequently Asked Questions

Why encode HTML?
Encoding special characters (e.g. < to &lt;) prevents them from being interpreted as HTML. This helps prevent XSS and lets you display code or user input safely.
Is my data sent to a server?
No. Encoding and decoding happen entirely in your browser. Your text never leaves your device.
What entities are supported?
The tool encodes & < > " and ', and decodes common HTML entities including named entities (e.g. &amp;, &lt;) and numeric entities (e.g. &#39;).