كيانات HTML
HTML entities encode characters that have special meaning in HTML (<, >, &, ") and characters outside the ASCII range (accented letters, symbols, emoji). Proper encoding prevents XSS vulnerabilities when displaying user input and ensures text renders correctly across all browsers and character sets.
المدخلات
المخرجات
حول HTML Entity Encoder / Decoder
HTML entities encode characters that have special meaning in HTML (<, >, &, ") and characters outside the ASCII range (accented letters, symbols, emoji). Proper encoding prevents XSS vulnerabilities when displaying user input and ensures text renders correctly across all browsers and character sets.
كيفية الاستخدام
- Paste text to encode HTML entities: & → &, < → <, > → >, " → ".
- Or paste HTML entities to decode them back to readable characters.
- Toggle between named entities (&), decimal (&), and hex (&) encoding.
- Use the XSS-safe mode to encode all potentially dangerous characters.
الصيغة والمنهجية
Named: & → & < → < > → > " → " ' → ' or ' (HTML5). Decimal: char → &#[decimal]; Hex: char → &#x[hex]; Special: copyright → © trademark → ™ registered → ® em-dash → — rsquo → ’ ellipsis → …
حالات الاستخدام الشائعة
- Security: encoding user input before inserting into HTML to prevent XSS
- Email templates: encoding special characters for email client compatibility
- CMS: ensuring article content with < or > renders correctly
- API responses: encoding HTML in JSON strings
- Troubleshooting: diagnosing why & shows as & in a page
الأسئلة الشائعة
أدوات ذات صلة
كل الأدوات →دمج هذه الأداة في موقعك
مجاني للاستخدام الشخصي والتجاري. فقط انسخ الكود أدناه.