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.
Encoded HTML
Paste text to encode it, or paste HTML entities such as &lt; or © to decode them.
HTML entity options
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 < 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.
| Character | Named/standard reference | Numeric reference |
|---|---|---|
| & | & | & |
| < | < | < |
| > | > | > |
| " | " | " |
| ' | ' | ' |
| © | © | © |
| € | € | € |
| é | é | é |
Named vs numeric HTML entities
©, © and © 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.
<a href="/menu">Fish & Chips</a>
<a href="/menu">Fish & Chips</a>
Crème brûlée – 5 €
Crème brûlée – 5 €
AT&amp;T
AT&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 😀 rather than two surrogate halves. Combined sequences keep every part: an e followed by a combining acute accent becomes e followed by ́, 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.
Related tools
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 &, <, © and 😀 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 & mean in HTML?
& is the named reference for the ampersand character (&). Because an ampersand starts a character reference in HTML source, a literal ampersand is written as & so the browser does not misread the text after it.
How do I decode < and >?
Switch to Decode HTML Entities and paste the text. < becomes < and > 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 ©. A numeric reference uses the Unicode code point, either in decimal (©) or hexadecimal (©). 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 é and 😀 becomes 😀 (or é and 😀 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 &lt; become < instead of <?
The text was encoded twice. Each conversion decodes exactly one layer, just as a browser does: & becomes &, leaving <. 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.