सीधे कंटेंट पर जाएँ
ToolMug

↑ ↓ से चुनें, Enter से खोलें, Esc से बंद करें।

HTML Entity Encoder और Decoder

HTML में सुरक्षित दिखने के लिए text escape करें, entities वाले text को readable characters में decode करें या JavaScript, JSON और CSS के लिए Unicode escape sequences बनाएँ।

आपके ब्राउज़र में चलता है — आपका डाला गया कुछ भी अपलोड नहीं होता

कैसे इस्तेमाल करें

  1. Encode या Decode और HTML या Unicode escapes चुनें।
  2. Text paste करें; type करते ही result update होगा।
  3. HTML encoding में केवल पांच special characters या सभी non-ASCII characters escape करने का विकल्प चुनें।
  4. Result copy करें।

विकल्पों की जानकारी

Escape special characters
& < > " ' को entities में बदलता है। UTF-8 web page के लिए यही पर्याप्त है और बाकी characters readable रहते हैं।
Non-ASCII भी escape करें
ASCII से बाहर हर character को numeric entity में बदलता है, उन systems के लिए जो UTF-8 store नहीं कर सकते।
Named entities
जहाँ उपलब्ध हो वहाँ &copy; और &nbsp; जैसे names, अन्यथा numeric entities उपयोग करता है।
Unicode escapes
JavaScript/JSON के लिए \uXXXX, modern JavaScript में \u{…}, code point के लिए U+XXXX और decimal HTML entity के लिए &#…; देता है।

Common entities

Character Named Numeric
& &amp; &#38;
< &lt; &#60;
> &gt; &#62;
“ &quot; &#34;
’ &apos; &#39;
non-breaking space &nbsp; &#160;
© &copy; &#169;
— &mdash; &#8212;

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

क्या HTML escaping XSS से बचाती है?

HTML element content में डालने से पहले text escape करना एक जरूरी defence है। Attributes, URLs, JavaScript और CSS contexts के अपने rules हैं; framework का built-in escaping उपयोग करें।

&nbsp; और normal space में क्या अंतर है?

Non-breaking space (U+00A0) space जैसा दिखता है पर वहाँ line wrap रोकता है और लगातार spaces collapse नहीं होतीं।

Semicolon के बिना &copy भी decode क्यों होता है?

Historical HTML rules के कारण कुछ common entities trailing semicolon के बिना भी decode होती हैं। Decoder browsers जैसे rules follow करता है।

JSON में emoji escape कैसे दिखाऊँ?

Unicode escapes और \uXXXX चुनें। Basic Multilingual Plane से बाहर emoji two escapes बनते हैं।

प्राइवेसी

यह टूल पूरी तरह आपके ब्राउज़र में चलता है। आपकी फ़ाइलें और टेक्स्ट आपके डिवाइस पर ही प्रोसेस होते हैं और हमारे सर्वर पर कभी अपलोड नहीं होते।

मिलते-जुलते टूल