HTML Escape Characters
Complete reference of HTML entities and special characters
Filter by Category
HTML Entities
| Character | Entity Name | Entity Number | Description | Action |
|---|
When to Use HTML Entities
Security (XSS Prevention)
Escape user input to prevent cross-site scripting attacks by converting special characters to entities
Display Code Examples
Show HTML, XML, or code snippets in web pages without being interpreted as actual code
Special Symbols
Display copyright ©, trademark ™, currency symbols, and other special characters correctly
International Characters
Include accented letters, Greek symbols, and characters from various languages in HTML
Mathematical Notation
Display mathematical symbols, operators, and formulas in web content and documentation
Arrows & Shapes
Add directional arrows, geometric shapes, and decorative elements without images
Frequently Asked Questions
What are HTML escape characters?
HTML escape characters (or HTML entities) are special codes used to display reserved characters and symbols in HTML. They start with & and end with ;. For example, < displays < and © displays ©. Escape characters prevent HTML from interpreting special characters as code and allow proper display of symbols not easily typed on keyboards.
Why do I need to escape HTML characters?
You need to escape HTML characters for two main reasons: 1) Security - to prevent XSS attacks by ensuring user input is displayed as text, not executed as HTML/JavaScript, and 2) Display - to show reserved HTML characters like <, >, &, and " correctly. Without escaping, < would be interpreted as starting an HTML tag instead of being displayed as text.
What is the difference between entity name and entity number?
Entity names (like ©) are human-readable shortcuts for characters, while entity numbers (like ©) use numeric codes. Entity names are easier to remember but not all characters have names. Entity numbers work for any Unicode character using decimal; or hex; format. Both display the same character, so choose based on readability and browser compatibility.
What are the most common HTML entities?
The most common HTML entities are: < (<), > (>), & (&), " ("), ' ('), (non-breaking space), © (©), ® (®), ™ (™). These are essential for displaying reserved HTML characters and common symbols correctly in web pages.
How do I use HTML entities in my code?
To use HTML entities, simply type them in your HTML code where you want the character to appear. For example: <p>© 2025 My Company</p> displays "© 2025 My Company". You can use either entity names (©) or numbers (©). Entities work in HTML attributes too: <a title="Prices > $100">Link</a>.
Can I use HTML entities in JavaScript?
HTML entities don't work directly in JavaScript strings, but they work when inserted into HTML. In JavaScript, use Unicode escapes (\u00A9 for ©) or the actual character. To decode HTML entities in JavaScript, insert them into innerHTML or use DOMParser. For encoding, use textContent or functions that escape special characters.
Is this HTML entities reference free?
Yes, our HTML escape characters reference tool is completely free with no registration required. Search unlimited entities, browse by category, copy codes instantly, and access the complete reference without any costs or limitations. The tool includes 150+ common HTML entities.
How do I display < and > in HTML?
To display < (less than) in HTML, use < or <. To display > (greater than), use > or >. These are essential because < and > are used for HTML tags. Without escaping, <div> would create a tag, but <div> displays "<div>" as text. Always escape these when showing code examples in HTML.
No comments yet. Be the first to share your thoughts!