← Cheat Sheets

HTML Entities Cheat Sheet

Some characters have special meaning in HTML. To display them as text, write an entity: an ampersand, a name or number, and a semicolon.

Reserved — must escape in content

EntityNumericRenders
&lt;&#60;<
&gt;&#62;>
&amp;&#38;&
&quot;&#34;"
&apos;&#39;'

Symbols & typography

EntityRenders
&nbsp;Non-breaking space
&copy; · &reg; · &trade;© · ® · ™
&mdash; · &ndash; · &hellip;— · – · …
&larr; · &rarr; · &darr; · &uarr;← · → · ↓ · ↑
&times; · &divide; · &minus;× · ÷ · −
&laquo; · &raquo;« · »
&bull; · &middot;• · ·
&euro; · &pound; · &yen;€ · £ · ¥

FAQ

When is escaping actually required?
Always escape < and & when they appear as text — < starts a tag the parser will try to execute, and & starts an entity the parser will try to resolve. Quotes matter inside attribute values.

Why does © render literally sometimes?
A missing semicolon. Browsers repair some entity typos, but only named entities with semicolons are guaranteed — write &copy; not &copy.

Entity vs numeric reference?
Named (&copy;) is readable; numeric (&#169;) covers every Unicode character, including ones with no named entity. Both are ASCII-safe for emails and old parsers.

Try it instead of memorizing it

Escape or unescape strings in the URL Encoder