HTML Entity Encoder & Decoder

Turn <, >, & and quotes into safe HTML entities, or convert entities such as &amp; and &#x1F600; back into readable text. All work happens in your browser.

Free Runs locally No signup
Mode
Named entities such as &copy; are used when available; otherwise numeric codes are written.
Input
Output
The converted text will appear here.
Encoding and decoding happen locally in your browser.0 → 0 chars

How to use it

1

Choose a direction

Switch between encoding text for HTML and decoding an entity string back to plain text.

2

Paste your content

Drop text or entities into the input box; the result updates immediately.

3

Copy the result

Copy or download the output, then paste it into your template, CMS or code.

Why use this tool

Reserved characters first

Ampersands, angle brackets and quotes are always escaped, so markup cannot break out of its context.

Named or numeric entities

Encode only reserved characters or every non-ASCII character, using names such as &copy; when one exists.

Emoji and accents

Characters outside the Basic Multilingual Plane are written as correct hexadecimal code points.

Frequently asked questions

What is an HTML entity?
An entity is a short code that represents a character HTML would otherwise misread, such as &lt; for a literal less-than sign.
What is the difference between named and numeric entities?
Named entities use a word, such as &copy;, while numeric entities use a code point, such as &#169; or &#xA9;. Both render the same character.
Does escaping prevent XSS?
Escaping is only one layer. Untrusted HTML still needs server-side sanitisation; never rely on client-side encoding alone for security.
Why did &amp; become &amp;amp;?
The ampersand itself is escaped, which is correct when the text is inserted as HTML. Decode first if the input was already escaped.
Are emoji supported?
Yes. Characters above U+FFFF are encoded as one numeric entity with the full code point, and decoded back correctly.

Related tools

Last updated: