HTML Entity Encoder / Decoder

Convert characters like <, > and & into HTML entities so code shows as text on a web page, or decode entities back.

🔒 Everything you type stays in your browser. Nothing is sent to a server.

By Shah Rukh, software developer · Last updated:

Why escape HTML?

Browsers treat < as the start of a tag. To show code examples, or to display user-submitted text safely, special characters must be replaced by entities. That also protects against cross-site scripting (XSS).

CharacterEntity
<&lt;
>&gt;
&&amp;
"&quot;
'&#39;
©&copy; or &#169;

Frequently asked questions

Do I need to encode accented letters?

Not if your page uses UTF-8, which almost all do. Only < > & and quotes are required.

What’s the difference between named and numeric entities?

Named entities like © are easier to read; numeric ones like © work for any character.

Does decoding run any scripts?

No. Decoding only swaps entities for characters as plain text, so nothing is ever executed.

Related tools

🔳

QR Code Generator

Free QR codes for links, Wi-Fi, text and contacts.

🏗️

Discord Server Template

Design channels and roles, then build them in one click.

🛡️

Discord Moderation Bot

Make your own mod bot with kick, ban, mute and filters.

🤖

Discord Bot Maker

Build a custom Discord bot without coding.

👋

Discord Welcome Bot

Custom welcome messages and auto-roles for new members.

🎨

Color Picker & Palette

HEX, RGB and HSL codes plus matching palettes.

See all Developer Tools →