ASCII Heart Symbol
The heart symbol ♥ (ASCII code 9829) represents love, affection, and emotions. It's also one of the four suits in playing cards and is widely used in digital communication and design.
Heart Symbol
♥
ASCII Code: 9829 | Hex: 2665 | HTML: ♥
Character Information
| Property | Value |
|---|---|
| ASCII Code (Decimal) | 9829 |
| ASCII Code (Hexadecimal) | 2665 |
| Unicode | U+2665 |
| HTML Entity (Named) | ♥ |
| HTML Entity (Numeric) | ♥ |
| Alt Code (Windows) | Alt + 3 |
| Character Type | Symbol, Card Suit |
Playing Card Suits
| Symbol | Name | ASCII | HTML Entity | Color |
|---|---|---|---|---|
| ♥ | Hearts | 9829 | ♥ | Red |
| ♦ | Diamonds | 9830 | ♦ | Red |
| ♣ | Clubs | 9827 | ♣ | Black |
| ♠ | Spades | 9824 | ♠ | Black |
Click any symbol to copy it to clipboard
Programming Examples
HTML/Web Development
<!-- Named HTML entity (recommended) -->
I ♥ coding!
<!-- Numeric HTML entity -->
I ♥ programming!
<!-- Direct Unicode character -->
I ♥ web development!
I ♥ coding!
<!-- Numeric HTML entity -->
I ♥ programming!
<!-- Direct Unicode character -->
I ♥ web development!
JavaScript
// Unicode escape sequence
let heart = '\u2665';
let fromCode = String.fromCharCode(9829);
// Usage in strings
let message = `I ${heart} JavaScript!`;
console.log(message); // I ♥ JavaScript!
// Creating heart patterns
let hearts = '♥'.repeat(5);
console.log(hearts); // ♥♥♥♥♥
let heart = '\u2665';
let fromCode = String.fromCharCode(9829);
// Usage in strings
let message = `I ${heart} JavaScript!`;
console.log(message); // I ♥ JavaScript!
// Creating heart patterns
let hearts = '♥'.repeat(5);
console.log(hearts); // ♥♥♥♥♥
Python
# Unicode escape sequence
heart = '\u2665'
from_code = chr(9829)
# Usage in strings
message = f"I {heart} Python!"
print(message) # I ♥ Python!
# Creating heart patterns
hearts = '♥' * 5
print(hearts) # ♥♥♥♥♥
heart = '\u2665'
from_code = chr(9829)
# Usage in strings
message = f"I {heart} Python!"
print(message) # I ♥ Python!
# Creating heart patterns
hearts = '♥' * 5
print(hearts) # ♥♥♥♥♥
C/C++
// UTF-8 encoding (may need proper locale)
printf("I ♥ C programming!\n");
std::cout << "I ♥ C++!" << std::endl;
// Unicode escape (C++11 and later)
std::cout << "I \u2665 modern C++!" << std::endl;
printf("I ♥ C programming!\n");
std::cout << "I ♥ C++!" << std::endl;
// Unicode escape (C++11 and later)
std::cout << "I \u2665 modern C++!" << std::endl;
Creative Uses of Heart Symbol
- Social Media: Express love and appreciation in posts
- User Interfaces: Like buttons, favorites, and ratings
- Gaming: Health indicators, life counters, and power-ups
- Card Games: Representing the hearts suit in digital cards
- Decorative Text: Borders, dividers, and artistic patterns
- Messaging: Emotional expression in text communication
Common Uses
- Digital Communication: Text messages, emails, and chat applications
- Web Design: Love buttons, rating systems, and decorative elements
- Card Games: Digital representations of playing cards
- Health/Life Indicators: Video games and applications
- Valentine's Day: Romantic themes and decorations
- Brand Identity: Companies focusing on love, care, or relationships
- ASCII Art: Creating heart patterns and decorative text
ASCII Heart Art
Simple heart pattern:
♥ ♥ ♥ ♥ ♥
♥ ♥ ♥ ♥
♥ ♥ ♥
♥ ♥
♥
Heart border:
♥♥♥♥♥♥♥♥♥♥
♥ Welcome! ♥
♥♥♥♥♥♥♥♥♥♥
♥ ♥ ♥ ♥ ♥
♥ ♥ ♥ ♥
♥ ♥ ♥
♥ ♥
♥
Heart border:
♥♥♥♥♥♥♥♥♥♥
♥ Welcome! ♥
♥♥♥♥♥♥♥♥♥♥