Entités 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.
Entrée
Sortie
À propos de 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.
Comment l'utiliser
- 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.
Formule et méthodologie
Named: & → & < → < > → > " → " ' → ' or ' (HTML5). Decimal: char → &#[decimal]; Hex: char → &#x[hex]; Special: copyright → © trademark → ™ registered → ® em-dash → — rsquo → ’ ellipsis → …
Cas d'usage courants
- 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
Questions fréquentes
Outils connexes
Tous les outils →Intégrer cet outil sur votre site
Gratuit pour usage personnel et commercial. Copiez simplement le code ci-dessous.