โ— processed entirely in your browser

HTML entity encode / decode

Turn <, &, quotes, and other special characters into safe HTML entities, or decode them back.

How it works

Encoding works by setting your text as a hidden element's textContent, then reading back its innerHTML โ€” the browser's own DOM serializer does the escaping, not a hand-written lookup table. Decoding runs the same trick in reverse: your entities are set as innerHTML, and the browser's HTML parser resolves them, then textContent reads out the plain result.

FAQ

Does this encode quotes and apostrophes into entities?
No โ€” because encoding relies on the browser's own serialization, only the characters that are actually unsafe in HTML text (&, <, >) get turned into entities. Straight quotes and apostrophes are left alone since they don't need escaping outside of attribute values.
Why does decoding work on entities like &hearts; or &copy;, not just the basic ones?
Because decoding hands your text to the browser's built-in HTML parser rather than a small hardcoded table, it recognizes the entire standard set of named HTML entities, not just &amp; and &lt;.

Free, unlimited, no account. If this saved you a paid tool, a small thanks is appreciated.

Say thanks โ€” $3