HTML Encode / Decode

Developer Tools

Escape or unescape &, <, >, quotes so markup stays literal.

Calculated Result
&lt;p class=&quot;x&quot;&gt;A &amp; B&lt;/p&gt;
Formula: & < > " ' β†’ HTML entities

About this calculator

Paste a snippet that must sit inside HTML. Encode before you embed it in a page. Decode when you copied entities from a view-source dump.

How It Works & Formula

Formula& < > " ' ↔ HTML entities

Replace & < > " ' with named/numeric entities; decode reverses the same five.