HTML Entities Encoder & List

The web developer's survival kit. Escape text for safety and quickly copy special symbols.

Entity Encoder

Instantly escape special characters for HTML safety.

©
©
Copyright
®
®
Registered
™
Trademark
&
&
Ampersand
<
&lt;
Less Than
>
&gt;
Greater Than
"
&quot;
Double Quote
'
&apos;
Single Quote
&nbsp;
Non-Breaking Space
&bull;
Bullet
&hellip;
Ellipsis
&euro;
Euro

Why "Escaping" Saves Websites

The internet is built on trust, but also on input validation. The number one security flaw on the web is XSS (Cross-Site Scripting).

Imagine a comment section where a user types: <script>stealCookies()</script>. If you display this directly, the browser executes the code. By using our tool to encode it into &lt;script&gt;, the browser displays the text safely, but never runs it. This simple act of "escaping" characters is the shield that protects millions of websites daily.

The Reserved Characters

These 5 characters are the "Big Five" of HTML safety. Memorize their entities:

  • <&lt;
  • >&gt;
  • &&amp;
  • "&quot;
  • '&apos;

Typography Matters

Entities aren't just for code; they're for professional writing.

Don't use a hyphen (-) when you mean an En Dash (–) for ranges (1990–2000). Don't use standard spaces inside headlines where a Non-Breaking Space ( ) would prevent an ugly line break. Using correct entities elevates your content from "blog post" to "publication quality".

Categorized Reference

Currency

Dollar ($) is safe, but Euro (€), Pound (£), and Yen (¥) should use entities to ensure they render correctly on computers with limited font sets or incorrect encodings.

Mathematical Operators

Don't represent "Multiplication" with "x". Use the proper entity × (×). This ensures screen readers announce it as "Times" instead of the letter X. Accessibility matters!

Invisible Characters

Sometimes you need a character you can't see! The &lrm; (Left-to-Right Mark) and &zwj; (Zero Width Joiner) are crucial for controlling complex text layouts and emojis.


Frequently Asked Questions

Why do I need to escape HTML?

If you want to display the text "

" on a webpage, the browser will interpret it as an actual code tag and try to render a division. Escaping it to "<div>" tells the browser to display the characters literally.

What is XSS (Cross-Site Scripting)?

XSS is a security vulnerability where attackers inject malicious scripts into webpages viewed by other users. Using HTML entities to "escape" user input prevents these scripts from executing, as the browser treats them as harmless text.

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

© is a "Named Entity" (easier to remember), while © is a "Numeric Entity" (references the ASCII/Unicode ID). Both display the exact same © symbol. Named entities are generally preferred for readability.

How do I make a non-breaking space?

Use the entity " ". This forces the browser to keep two words together on the same line, which is useful for units (e.g., "10 kg") or preventing "widow" words in typography.

Does UTF-8 replace HTML Entities?

Mostly, yes. If your document is saved as UTF-8, you can type symbols like © directly. However, reserved characters like <, >, &, and " MUST still be escaped to avoid breaking the HTML syntax.

What is the entity for the ampersand (&)?

The ampersand itself is a reserved character (it starts an entity!). It must be escaped as "&" to display correctly.

Can I use emojis in HTML?

Yes! Modern browsers support emojis natively. You rarely need entities for emojis unless you are supporting very old systems. You can just copy-paste the emoji 🚀 or use its hex code.

What does &quot; stand for?

" represents a double quotation mark ("). It is crucial for escaping values inside HTML attributes, e.g., .

Are HTML character codes case sensitive?

Yes! Named entities like É (É) and é (é) are sensitive. Numeric entities are not case sensitive regarding the "x" (&#x...) but the value matters.

How do I display an arrow symbol in HTML?

Use entities like ← (Left), → (Right), ↑ (Up), and ↓ (Down). These render arrows cleanly without needing images.

What is textContent vs innerHTML?

In JavaScript, setting textContent automatically escapes special characters (safe). Setting innerHTML renders tags (unsafe if user input). Always prefer textContent for safety.

What is the copyright symbol code?

The copyright symbol (©) is © or ©.

What is the trademark symbol code?

The trademark symbol (™) is ™ or ™. The registered trademark (®) is ®.

Can I invent my own entities?

No, the list of named entities is defined by the W3C HTML specification. You cannot create &mydog; unless you use JavaScript to replace it.

How do I decode HTML entities back to text?

You can use our tool above! Or in JavaScript, create a temporary DOM element, set its innerHTML to the encoded string, and read back the textContent.