Skip to content
Unicode Explained

HTML Entities Explained (With a Symbol Cheat Sheet)

Named, decimal and hex HTML entities, when you actually need them, and a copy-ready cheat sheet of the most-used symbol codes.

By SymbolHeroUpdated 6 min read

An HTML entity is a piece of text that starts with & and ends with ; and stands in for a character, for example &copy; for © or &#8364; for €. You only strictly need them for characters HTML treats as markup (&, < and, in attributes, quotes) and for invisible characters you want to keep visible in your source.

©︎Copyright SymbolU+A9Details

The three kinds of character reference

HTML calls these “character references”, and there are three forms. All three below produce the same copyright sign ©:

Type Syntax Example
Named &name; &copy;
Decimal numeric &#DDD; &#169;
Hexadecimal numeric &#xHHHH; &#xA9;

Named entities are readable, but only characters that have been given a name in the HTML specification have one. The current HTML standard defines over two thousand names, including many math and arrow names, while the older HTML 4 list had about 250.

Numeric references work for every Unicode character, with or without a name. The number is the character’s Unicode code point. For hexadecimal, copy the digits after U+: U+20AC becomes &#x20AC;. For decimal, convert the hex number: 0x20AC is 8364, so &#8364;. The Unicode Converter does this for you and shows both forms side by side.

When you actually need entities

1. Characters that HTML reserves

These must be escaped when you want them to appear as text:

  • &&amp;. Always escape it in text and in attribute values, including URLs in href that contain query strings like ?a=1&amp;b=2.
  • <&lt;. Otherwise the browser thinks a tag is starting. This is how you show code such as &lt;div&gt; on a page.
  • >&gt;. Not strictly required in normal text, but escaping it alongside < is standard practice.
  • "&quot; inside a double-quoted attribute value.
  • '&#39; or &apos; inside a single-quoted attribute value. &apos; is valid in HTML5 and XML but was not defined in HTML 4, so &#39; is the most compatible choice.

Escaping these characters is also a security measure. Any time user input is written into a page, converting & < > " ' to references prevents that input from being interpreted as HTML or script.

2. Invisible and ambiguous characters

Some characters look like nothing, or like something else, in your source code. Writing them as references makes your intent clear to the next person who edits the file:

3. When you cannot rely on the file encoding

If a page, email template or CMS field might not be saved or served as UTF-8, a numeric reference survives because it is made entirely of ASCII characters. &#8364; becomes € no matter how the file is encoded.

When you do not need them

If your page is saved as UTF-8 and declares <meta charset="utf-8">, you can type or paste ©, €, é, → and emoji directly. That is easier to read and edit than a wall of entities. Modern practice is to escape only the reserved characters and the invisible ones.

HTML entity cheat sheet

These are the characters people reach for most often. Every named entity below is part of the HTML standard; the numeric forms work everywhere. Click through for copy buttons and keyboard shortcuts, or see the full HTML entity reference.

Character Name Named entity Decimal Hex
& Ampersand &amp; &#38; &#x26;
< Less-Than Sign &lt; &#60; &#x3C;
> Greater-Than Sign &gt; &#62; &#x3E;
Quotation Mark &quot; &#34; &#x22;
Apostrophe &apos; &#39; &#x27;
(space) Non-Breaking Space &nbsp; &#160; &#xA0;
© Copyright Symbol &copy; &#169; &#xA9;
® Registered Trademark Symbol &reg; &#174; &#xAE;
Trademark Symbol &trade; &#8482; &#x2122;
Em Dash &mdash; &#8212; &#x2014;
En Dash &ndash; &#8211; &#x2013;
Ellipsis &hellip; &#8230; &#x2026;
Left Single Quotation Mark &lsquo; &#8216; &#x2018;
Right Single Quotation Mark (Apostrophe) &rsquo; &#8217; &#x2019;
Left Double Quotation Mark &ldquo; &#8220; &#x201C;
Right Double Quotation Mark &rdquo; &#8221; &#x201D;
Bullet Point &bull; &#8226; &#x2022;
° Degree Symbol &deg; &#176; &#xB0;
× Multiplication Sign &times; &#215; &#xD7;
÷ Division Sign &divide; &#247; &#xF7;
± Plus-Minus Sign &plusmn; &#177; &#xB1;
Not Equal Sign &ne; &#8800; &#x2260;
Less Than or Equal To &le; &#8804; &#x2264;
Greater Than or Equal To &ge; &#8805; &#x2265;
Infinity Symbol &infin; &#8734; &#x221E;
Euro Sign &euro; &#8364; &#x20AC;
£ Pound Sign &pound; &#163; &#xA3;
¥ Yen Sign &yen; &#165; &#xA5;
¢ Cent Sign &cent; &#162; &#xA2;
Right Arrow &rarr; &#8594; &#x2192;
Left Arrow &larr; &#8592; &#x2190;
½ One Half Fraction &frac12; &#189; &#xBD;
§ Section Sign &sect; &#167; &#xA7;
Paragraph Sign (Pilcrow) &para; &#182; &#xB6;
Check Mark &check; &#10003; &#x2713;
Black Heart Suit &hearts; &#9829; &#x2665;

Rules that trip people up

  • Names are case-sensitive. &Delta; is Δ and &delta; is δ. &COPY; happens to work because the specification includes it as an alias, but most uppercase variants do not exist.
  • Always include the semicolon. Browsers tolerate a missing semicolon on a few legacy names such as &copy, which means unescaped page text like ?id=5&copy=2 can display as ?id=5©=2. Always write the semicolon, and always escape a literal & as &amp;.
  • Not every character has a name. The Indian rupee sign ₹, the interrobang ‽ and most emoji have none. Use a numeric reference such as &#x20B9;.
  • XML is stricter. XML, SVG and XHTML files only predefine &amp; &lt; &gt; &quot; &apos;. Use numeric references for everything else there.
  • Entities are HTML only. In CSS content use a backslash escape like "2192", in JavaScript strings use "u2192", and in JSON use the literal character or a u escape.
  • Emoji above U+FFFF need the full code point in a reference: 😀 is &#x1F600;, not two separate surrogate values.

Entities in WordPress and other editors

In the WordPress block editor you can usually paste the character itself; it will be stored as UTF-8. If you need an entity, for example a non-breaking space between a number and its unit, switch the block to “Edit as HTML” and type it there. Some visual editors convert entities to raw characters when you save, so check the output with your browser’s view-source if a specific entity matters.

To find out what an unknown character in your content actually is, paste it into the Unicode Lookup tool; it shows the code point, which gives you the numeric reference immediately.

Frequently asked questions

What is the difference between &#169; and &copy;?

Nothing in the output. Both produce ©. The first is a decimal numeric reference, the second a named reference. Numeric references work for every character; named ones only exist for some.

Do I need &nbsp; for spacing?

Not for layout. Use CSS margins and padding for spacing. Use &nbsp; only when two words must not be split across lines, such as a number and its unit.

How do I write an HTML entity for any Unicode symbol?

Take the code point (for example U+2713 for ✓), and write &#x2713;. You can look up any character’s code point on its SymbolHero page or in the Unicode Converter.

Are HTML entities the same as Unicode?

No. Unicode assigns the characters their numbers; HTML entities are just a way to write those characters in HTML source. Numeric references use the Unicode code point directly.

Need a different symbol?

Search 7,503 symbols by name, everyday word or code point, and copy any of them in one tap.