◨ DEVELOPER Updated July 25, 2026

HTML Entity Encoder / Decoder

Escape or unescape HTML entities safely.

Text
Result
Ad space · belowTool · horizontal

How it works

Encoding replaces the characters that break markup — &, <, >, quotes — with their named entities, optionally extending to every non-ASCII character. Decoding uses the browser's own parser, so it understands the full named-entity table.

Frequently asked questions

When do I need to escape HTML?

Any time user-supplied text is inserted into markup. Escaping is the simplest defence against cross-site scripting.

What is the difference between &amp;#39; and &amp;apos;?

Both represent an apostrophe. The numeric form &#39; is safer because &apos; is not defined in older HTML versions.

Comments

Comments aren't enabled yet. When you're ready, this is where a service like Giscus, Disqus, or a custom form would go — the slot is already reserved on every tool page.