Skip to content
CleanGlyph home

HTML Entity Encoder & Decoder

Encode text into HTML entities or decode HTML character references instantly. Convert &, <, numeric entities, accented letters and Unicode symbols. Free, private and browser-based.

Your text never leaves your browser.

0 charactersAnalyzed as you type

Encoded HTML

Paste text to encode it, or paste HTML entities such as &amp;lt; or &#169; to decode them.

HTML entity options

Direction
Encode what

How to encode or decode HTML entities online

Choose a direction in the options panel: Encode HTML Entities to make text safe for HTML source, or Decode HTML Entities to turn references back into readable characters. Paste your text and the result updates as you type. When encoding, pick whether to escape only the HTML special characters or also every non-ASCII character, and whether numeric references use decimal or hexadecimal. Copy the result, or send it back into the input with Use as input.

What are HTML entities?

HTML entities, more precisely called character references, are short codes that stand for a single character. They start with an ampersand and usually end with a semicolon, such as &lt; for <. Browsers treat < as the start of a tag and & as the start of a reference, so these characters must be escaped when you want them to appear as text. Quotes need escaping inside attribute values for the same reason.

HTML entity examples

Each row shows equivalent ways to write the same character. The table illustrates the alternatives; the exact form this tool produces depends on the encoding option you choose.

Characters with their named and numeric HTML references
CharacterNamed/standard referenceNumeric reference
&&amp;&#38;
<&lt;&#60;
>&gt;&#62;
"&quot;&#34;
'&#39;&#39;
©&copy;&#169;
€&euro;&#8364;
é&eacute;&#233;

Named vs numeric HTML entities

&copy;, &#169; and &#xA9; all display ©. The first is a named reference, readable but only available for characters that HTML defines a name for. The second is a decimal numeric reference and the third a hexadecimal one; both use the character's Unicode code point (U+00A9), so they work for any character, including emoji. The encoder always uses numeric references for non-ASCII text because they are unambiguous.

Encoding vs decoding

Encoding replaces characters with references so text can be pasted into HTML source safely. Decoding does the reverse and removes exactly one layer of references.

Text
<a href="/menu">Fish & Chips</a>
Encoded
&lt;a href=&quot;/menu&quot;&gt;Fish &amp; Chips&lt;/a&gt;
Text (non-ASCII, decimal)
Crème brûlée – 5 €
Encoded
Cr&#232;me br&#251;l&#233;e &#8211; 5 &#8364;
Encoded twice
AT&amp;amp;T
Decoded once
AT&amp;T

HTML entities vs removing HTML tags

Decoding character references does not strip markup. If the input contains <b>bold</b>, the tags stay in the decoded text. To turn a web page or email template into readable plain text, use Remove HTML Tags, which removes tags and decodes references in one step. Here, decoded output is always shown as plain text and never rendered, so decoded markup cannot run scripts or load images.

Unicode and emoji

With non-ASCII encoding, each Unicode code point above U+007F becomes its own numeric reference. 😀 is a single code point, U+1F600, so it becomes &#128512; rather than two surrogate halves. Combined sequences keep every part: an e followed by a combining acute accent becomes e followed by &#769;, and a family emoji joined with zero-width joiners becomes one reference per person and per joiner. Nothing is normalized or dropped. To see which code points a string contains, open it in the Unicode Inspector.

Strip symbols and punctuation with Remove Special Characters, fix spacing and hidden characters with the Text Cleaner, or change leftover fragments in bulk with Find & Replace.

Frequently asked questions

How do I decode HTML entities online?

Choose Decode HTML Entities, then paste your text. References such as &amp;, &lt;, &copy; and &#x1F600; are turned into the characters they stand for as you type, and the result is ready to copy.

How do I convert text to HTML entities?

Keep the default Encode HTML Entities direction and paste your text. The characters & < > " and ' are replaced with safe references. Choose HTML special characters + non-ASCII to also convert accented letters, symbols and emoji into numeric references.

What does &amp; mean in HTML?

&amp; is the named reference for the ampersand character (&). Because an ampersand starts a character reference in HTML source, a literal ampersand is written as &amp; so the browser does not misread the text after it.

How do I decode &lt; and &gt;?

Switch to Decode HTML Entities and paste the text. &lt; becomes < and &gt; becomes >. The result is shown as plain text only, so decoded markup such as <script> is displayed, never run.

What is the difference between named and numeric HTML entities?

A named reference uses a readable name, such as &copy;. A numeric reference uses the Unicode code point, either in decimal (&#169;) or hexadecimal (&#xA9;). All three produce the same © character; numeric references work for every character, while names exist only for a defined set.

Can I encode accented characters and emoji?

Yes. Select HTML special characters + non-ASCII. Every character above U+007F becomes a numeric reference based on its code point, so é becomes &#233; and 😀 becomes &#128512; (or &#xE9; and &#x1F600; in hexadecimal).

Does decoding HTML entities remove HTML tags?

No. Decoding only converts character references back into characters. Tags written as real markup stay in the text exactly as they are. To strip tags and keep the visible text, use the Remove HTML Tags tool instead.

Why does &amp;lt; become &lt; instead of <?

The text was encoded twice. Each conversion decodes exactly one layer, just as a browser does: &amp; becomes &, leaving &lt;. Run Decode again with Use as input if you need to remove the second layer.

Is my text uploaded or stored?

No. Encoding and decoding run entirely in your browser. Your text is not sent to a server, not included in analytics, and not saved in local storage, cookies or the page URL. Only the Copy button puts the result on your clipboard.