Stax

HTML एंटिटी एन्कोडर / डिकोडर

HTML स्पेशल कैरेक्टर को एंटिटी में एन्कोड करें या एंटिटी डिकोड करें।

Common HTML entities reference
CharEntityCharEntity
&&amp;<&lt;
>&gt;"&quot;
'&#39; &nbsp;
©&copy;®&reg;
&trade;&euro;
£&pound;¥&yen;
¢&cent;§&sect;
°&deg;±&plusmn;
×&times;÷&divide;
¼&frac14;½&frac12;
¾&frac34;&ndash;
&mdash;&lsquo;
&rsquo;&ldquo;
&rdquo;&bull;
&hellip;&larr;
&rarr;&uarr;
&darr;&harr;
&spades;&clubs;
&hearts;&diams;

HTML एंटिटी एन्कोडर/डिकोडर क्या है?

यह टूल HTML special characters (<, >, &, ") को entities (&lt;, &gt;, &amp;, &quot;) में encode करता है और वापस decode करता है। XSS prevention, code blocks में literal HTML दिखाने के लिए ज़रूरी।

टूल का उपयोग कैसे करें

  1. Text या HTML entities paste करें।
  2. Encode या Decode चुनें।
  3. Named या Numeric entities select करें।
  4. तुरंत output देखें।

Common HTML entities

  • &lt; = < (less than)
  • &gt; = > (greater than)
  • &amp; = & (ampersand)
  • &quot; = " (double quote)
  • &nbsp; = non-breaking space

अक्सर पूछे जाने वाले प्रश्न

HTML entities क्या हैं?
HTML में कुछ characters (<, >, &, ") की special meaning है — उन्हें plain text में दिखाने के लिए entities इस्तेमाल होते हैं। &lt; = <, &gt; = >, &amp; = &, &quot; = "। Code blocks में या HTML output में जब special chars literal दिखाने हों।
Named और numeric entities में क्या फर्क है?
Named: &copy; (©), &euro; (€), &nbsp; ( ) — readable। Numeric: &#169;, &#8364; — universal। Hex: &#x00A9; — modern। Browsers तीनों सपोर्ट करते हैं। Named ज्यादा maintainable, numeric ज्यादा reliable।
क्या सब Unicode characters encode होने चाहिए?
नहीं — UTF-8 encoded HTML में हिंदी, चीनी, इमोजी directly use कर सकते हैं। केवल HTML-special characters (<, >, &) और कभी-कभी double quote (") encode करना ज़रूरी। पुराने ASCII-only systems के लिए सब non-ASCII को encode करते थे।
User input के लिए कौन से entities ज़रूरी हैं?
XSS attacks से बचने के लिए <, >, &, double quote, single quote को हमेशा encode करें जब user-provided content HTML में डाल रहे हों। Modern frameworks (React, Vue) automatically करते हैं। Manually template बनाते समय ध्यान रखें।

संबंधित टूल्स