&
Selected character
Ampersand
Entity
&
Unicode
U+0026
Other names
Decimal
&
Hex
&
CSS
\0026
JavaScript
\u0026
Note
The older names &amp and &AMP work even without the semicolon, but the HTML standard counts that as a parse error.
A click copies the
Recently used
No characters copied yet.

Common characters

49 characters

The five characters with special meaning in HTML markup, then everyday symbols such as ©, €, ½ and →.

ASCII characters

35 characters

The HTML standard even has names for plain ASCII characters, such as &excl; for ! and &num; for #, though in text only & and < need a reference. Three names in this section stand for pairs of code points, an ASCII character followed by a combining mark, such as &nvlt; for <⃒.

Spaces, dashes, quotes and punctuation

49 characters

Invisible characters show a short label, such as ZWSP for the zero width space. Click one to see its full name and codes.

Latin-1 letters and symbols

96 characters

Every character from U+00A0 to U+00FF has a name, and 98 of the 106 names that work without a semicolon are for characters in this range.

More accented letters and ligatures

141 characters

Accented letters beyond Latin-1, such as &Scaron; for Š, along with accent marks and ligatures such as &fflig; for ff. Letters such as é are in the Latin-1 section.

Greek letters

59 characters

Names are case-sensitive, so &Delta; gives Δ and &delta; gives δ.

Cyrillic letters

92 characters

Every letter of the Russian, Bulgarian, Belarusian, Serbian and Macedonian alphabets has a name, such as &ZHcy; for Ж. In Ukrainian, only Ґ and ґ have none.

Arrows

177 characters

Plain, double, curved and barbed arrows. Two of them are pairs of code points, an arrow followed by a combining slash, such as &nrarrw; for ↝̸.

Math operators

272 characters

Operators, relations and set symbols, such as &ne; for ≠ and &sube; for ⊆. Of these, 41 are pairs of code points, a symbol followed by a combining mark or a variation selector.

More math symbols

271 characters

Less common operators, brackets and relations from the supplemental and miscellaneous math blocks.

Math letters and letterlike symbols

175 characters

Script, fraktur and double-struck letters such as &Aopf; for 𝔸. Of these, 133 sit above U+FFFF, outside the Basic Multilingual Plane.

Shapes, boxes and technical symbols

111 characters

Box-drawing lines, shade blocks and geometric shapes, such as &boxh; for ─ and &squ; for □.

Symbols and fractions

33 characters

Card suits, check and cross marks, fractions such as &frac13; for ⅓, and the euro sign. The dollar, cent, pound and yen signs, and the fractions ½, ¼ and ¾, are in the ASCII and Latin-1 sections.

About HTML Entities

What is an HTML entity?

An HTML entity is a code, such as &amp;, that a browser replaces with the character it stands for.

The HTML standard calls it a character reference and allows three forms. The name &copy;, the decimal number &#169; and the hexadecimal number &#xA9; all give the same ©.

HTML defines 2,231 entity names for 1,511 different characters. A numeric reference can stand for almost any Unicode character, so a character with no name can still be written as a number.

  • Older names without a semicolon. Of the 2,231 names, 2,125 end in a semicolon. The other 106 are older names written without it, such as &copy, and each one also exists with the semicolon.
  • Two code points in one name. Of the 1,511 characters, 65 are pairs of code points, and 93 names stand for them, such as &nesim; for ≂̸, a minus tilde with a slash through it.
  • Case-sensitive names. &Delta; gives Δ, &delta; gives δ, and &DELTA; is not a name.
  • Several names, one character. A character can have up to six names. Only the almost-equal sign ≈ has six, including &asymp; and &approx;.

When should you use HTML entities?

Use a character reference when a character would otherwise be read as markup.

In text, write &lt; for < and &amp; for &. Inside a double-quoted attribute value, write &amp; for & and &quot; for ". On a page saved as UTF-8, almost every other character can be typed as itself.

References still help with characters you can't see or easily type, such as the no-break space (&nbsp;) or the zero width space (&ZeroWidthSpace;). They also keep characters intact when text passes through a system that doesn't use UTF-8.

How to write a character reference

  1. Search the list by name, character or code point, such as rarr, → or U+2192.
  2. Click the character to copy its entity name. Its decimal and hex references appear in the Selected character panel, ready to copy.
  3. Paste it into your HTML, and keep the semicolon at the end.
  4. Check the page. If the code itself shows up, the name is misspelled, the semicolon is missing, or the text was escaped twice.

Example

The input text will be converted to escaped HTML by the rules in the HTML standard. Browsers use the same rules when they turn a page back into markup, for example when a script reads innerHTML.

Input: text
Q&A: 5 < 6 and 7 > 4 in "Tom's" notes
Output: escaped
Q&amp;A: 5 &lt; 6 and 7 &gt; 4 in "Tom's" notes
Q&amp;A: 5 &lt; 6 and 7 &gt; 4 in &quot;Tom's&quot; notes

The first output line is for text between tags, and the second is for a double-quoted attribute value. The apostrophe needs no reference in either line. A bare > is valid in both lines, and a bare < is valid in the attribute value, though browsers write them as &gt; and &lt;.

Our HTML entity encoder escapes a whole block of text at once.

What is the entity for a space, an apostrophe or an arrow?

A normal space has no entity name, and &nbsp; is a different character, the no-break space.

The table lists characters people often search for. The cloud ☁ has no entity name, so its reference has to be a number, such as &#9729;.

Named and numeric references for commonly searched characters
CharacterWhat it isNamed referenceDecimal
&Ampersand&amp;&#38;
<Less-than sign&lt;&#60;
>Greater-than sign&gt;&#62;
"Quotation mark&quot;&#34;
'Apostrophe&apos;&#39;
NBSPNo-break space&nbsp;&#160;
·Middle dot&middot;&#183;
.Period&period;&#46;
•Bullet&bull;&#8226;
✓Check mark&check;&#10003;
→Rightwards arrow&rarr;&#8594;
←Leftwards arrow&larr;&#8592;
$Dollar sign&dollar;&#36;
?Question mark&quest;&#63;
©Copyright sign&copy;&#169;
°Degree sign&deg;&#176;
☁CloudNone&#9729;

Should you use a name, a number or the character itself?

Type the character itself unless it is markup or invisible.

A UTF-8 page can hold almost any character directly, which keeps the source readable. Names are easier to read than numbers, but only 1,511 characters have one.

Four ways to write the copyright sign in HTML
WayExampleWorks forBest for
The character©Almost every character, on a page saved as UTF-8Most text, because the source stays readable
Named reference&copy;The 1,511 characters that have a nameMarkup characters such as & and <, and invisible ones such as the no-break space
Decimal reference&#169;Almost every Unicode characterCharacters with no name, when you know the decimal number
Hexadecimal reference&#xA9;Almost every Unicode characterCharacters with no name, when you know the hex code point

Common mistakes

Each of these mistakes shows the wrong text on the page or breaks the HTML standard's rules.

  • Leaving out the semicolon. Without it, only numeric references and 106 older names, such as &copy, still work. In text, &notin shows as ¬in instead of ∉, because browsers read the older name &not at its start.
  • Escaping text twice. &amp;copy; shows "&copy;" instead of ©. This happens when a template escapes text that is already escaped, so escape it once, when you output it.
  • Copying codes from old Windows text. &#150; and &#146; come from the Windows-1252 code page. Browsers turn them into – and ’, but the HTML standard counts them as parse errors, so write &ndash; and &rsquo;.

Where do the entity names come from?

The names come from the named character references table in the HTML standard, maintained by WHATWG.

We built the list from entities.json, the standard's machine-readable copy of that table, and took the character names from Unicode 18.0. A name that is missing from the named character references table does not work in HTML.

The MDN glossary says "HTML entity" is another name for a character reference.

Frequently Asked Questions

What does &#39; mean in HTML?

&#39; is the apostrophe ('), code point U+0027, written as a decimal reference. The current HTML standard also names it &apos;, which HTML 4 did not define.

Are entity names case-sensitive?

Yes, entity names are case-sensitive. &Alpha; gives Α, &alpha; gives α, and &ALPHA; is not a name at all.

Does a character reference need the semicolon?

Yes, always end a reference with a semicolon. Without it, browsers still read numeric references such as &#169 and 106 older names such as &copy, but the HTML standard counts that as a parse error.

Do entity names work in JavaScript strings?

No, JavaScript leaves &copy; in a string as six plain characters. Write the escape \u00A9 instead, or assign the text to innerHTML when you want HTML to parse it.

Do entity names work in React JSX?

Only some do. In JSX text, Babel and esbuild decode numeric references, &apos; and the HTML 4 names such as &copy;, while newer names such as &check; stay as plain text.

How many named character references does HTML have?

HTML defines 2,231 names. Many characters have more than one name, so the 2,231 names cover only 1,511 characters.

What is the difference between &nbsp; and a normal space?

&nbsp; is U+00A0, a no-break space that keeps the words on either side on one line. A normal space, U+0020, can break a line, and by default browsers collapse several of them into one.