Free HTML Encoder और Decoder
यह free tool टेक्स्ट को HTML entities में encode करता है, less-than, greater-than, ampersand और quotes जैसे characters को safe codes में बदलता है, या named और numeric entities को readable characters में decode करता है। आप हर non-ASCII letter को numeric entity के रूप में भी encode कर सकते हैं। यह किसी भी व्यक्ति के लिए उपयोगी है जो web page पर code दिखाना चाहता है या & और ’ जैसे codes से भरे टेक्स्ट को साफ करना चाहता है।
HTML Encoder और Decoder
Generators and Converters
इस टूल के बारे में
HTML में, कुछ characters का special meaning है: less-than sign एक tag शुरू करता है, ampersand एक entity शुरू करता है, और quotes attribute values को बंद करते हैं। उन्हें टेक्स्ट के रूप में दिखाने के लिए, उन्हें <, & और " जैसे entities के रूप में लिखा जाता है। इसे भूलना ही कारण है कि code samples page से गायब हो जाते हैं या इसके layout को तोड़ते हैं।
यहाँ encoding डिफ़ॉल्ट रूप से उन पाँच characters को replace करता है। non-ASCII option को चालू करने से accented letters, symbols और emoji को भी numeric entities के रूप में लिखा जाता है, जो पुरानी systems और email templates के लिए उपयोगी है जो UTF-8 को अच्छी तरह handle नहीं करते। Decoding प्रक्रिया को reverse करता है और © जैसे named entities, ’ जैसे decimal entities और ’ जैसे hexadecimal entities को समझता है।
Encoding sanitising के समान नहीं है। यह टेक्स्ट को display के लिए safe बनाता है, लेकिन यह untrusted HTML को storage के लिए clean नहीं करता। Output escaping आपके code में होना चाहिए, उस बिंदु पर जहाँ टेक्स्ट को page में लिखा जाता है। यहाँ कुछ भी paste नहीं किया जाता है।
अक्सर पूछे जाने वाले सवाल
Encoder कौन से characters को बदलता है?
डिफ़ॉल्ट रूप से पाँच: ampersand, less-than, greater-than, double quote और single quote। ये वे characters हैं जो markup या attributes को तोड़ सकते हैं। non-ASCII option को चालू करें ताकि accented letters, symbols और emoji को भी numeric entities में convert किया जाए।
मुझे टेक्स्ट को HTML entities के रूप में कब encode करना चाहिए?
जब भी आप web page के अंदर code, एक tag या user-typed टेक्स्ट दिखाते हैं और चाहते हैं कि यह display हो न कि run हो। इसका उपयोग email templates और पुरानी systems के लिए भी किया जाता है जो special characters को गलत तरीके से handle करते हैं। UTF-8 के रूप में serve किए गए modern pages को accented letters को encode करने की आवश्यकता नहीं है।
क्या यह numeric और hexadecimal entities को decode कर सकता है?
हाँ। Named entities, decimal entities और hexadecimal entities सभी को समझा जाता है, इसलिए copyright sign के तीनों अलग-अलग spellings एक ही character में decode होते हैं। Unknown names को जैसे हैं वैसे ही छोड़ दिया जाता है, इसलिए कुछ भी खो नहीं जाता है।
क्या encoding cross-site scripting से बचाव करता है?
यह defence का एक हिस्सा है, जब यह उस समय किया जाता है जब टेक्स्ट को page में लिखा जाता है और सही context के लिए। यहाँ एक बार टेक्स्ट paste करना site को secure नहीं करता है। हर output पर अपने framework या language escaping function का उपयोग करें।

