| Char | Named | Numeric |
|---|---|---|
| & | & | & |
| < | < | < |
| > | > | > |
| " | " | " |
| ' | ' | ' |
|   | |
| © | © | © |
| ® | ® | ® |
| ™ | ™ | ™ |
| € | € | € |
| £ | £ | £ |
| ¥ | ¥ | ¥ |
| — | — | — |
| – | – | – |
| … | … | … |
| « | « | « |
| » | » | » |
| ° | ° | ° |
| × | × | × |
| ÷ | ÷ | ÷ |
What are HTML entities?
HTML entities are codes that stand for characters with a special meaning in HTML, such as < for < and & for &. You encode text as entities before you put it into a page, so that the browser shows it as text and does not read it as HTML.
How to encode HTML entities
- Pick Encode or Decode.
- In encode mode, select the extra characters to convert: Quotes, Apostrophe or Non-ASCII.
- Type or paste your text. The result updates as you type.
- Look up a character in the Common HTML Entities table.
- Click Swap to send the result back through the other direction.
Named or numeric entities?
© and © both give ©. Named entities are easier to read in HTML. Numeric entities work everywhere, including XML, which knows only a few named entities. If the output goes into XML, use numeric entities.
Frequently Asked Questions
When should I encode HTML entities?
Encode all text that comes from outside your code before you put it into HTML: comments, titles, product descriptions. If you do not, a < in the text opens a tag. This is how cross-site scripting (XSS) attacks start.
What is the difference between named and numeric entities?
© and © both give ©. Named entities are easier to read. Numeric entities also work in XML and in old specifications.
Do I need to encode quotes and apostrophes?
Inside element content, only <, > and & need encoding. Inside an attribute value, also encode the quote character that surrounds the value. Turn on Quotes and Apostrophe for output that goes into attributes.
What does the Non-ASCII option do?
It converts every character above code point 127 (accented letters, emoji, Chinese characters, symbols) to a numeric entity such as é. You need it only when the destination does not handle UTF-8.
Does this tool send my data to a server?
No. Encoding and decoding run in your browser. Your text stays on your device.