एन्कोडिंग
URL Encode/Decode
URL एन्कोडिंग और डिकोडिंग — लिंक और क्वेरी पैरामीटर में एस्केप करने योग्य कैरेक्टर।
URL encoding (percent-encoding) replaces characters that aren't allowed in a URL — spaces, non-Latin letters, special characters — with %XX sequences, where XX is the hex code of the byte. This keeps links and query parameters from getting mangled in transit.
How to use it
- Encode: paste text or a URL and any character outside the safe ASCII set is replaced with a %XX sequence.
- Decode: paste an encoded string to see the original text.
- Encoding a full URL and encoding a single query parameter use slightly different safe-character sets — pick the mode that matches what you're encoding.
Common uses
- Building query parameters from text containing spaces, ampersands, or non-Latin characters.
- Debugging why a link with a parameter breaks — often the cause is an unencoded special character.
- Decoding URLs from third-party systems to read them in their original form.
Things to keep in mind
Encode parameter values, not the whole URL at once — otherwise you'll also encode the separators you need (:, /, ?, &).
JavaScript's encodeURIComponent and encodeURI encode different character sets — the former is meant specifically for parameter values.
इस टूल के बारे में लेख: URL Encode/Decode: लिंक में percent-encoding
अक्सर पूछे जाने वाले प्रश्न
Component और URI एन्कोडिंग में क्या फ़र्क़ है?
Component मोड (encodeURIComponent) क्वेरी पैरामीटर या पाथ सेगमेंट जैसे एक हिस्से के लिए है और &, =, / जैसे कैरेक्टर्स को भी एस्केप करता है, जबकि URI मोड पूरे URL के लिए है और उन कैरेक्टर्स को छोड़ देता है जो URL के स्ट्रक्चर के लिए ज़रूरी हैं।
क्या URL-एन्कोडिंग और URL-सेफ़ Base64 एक ही चीज़ हैं?
नहीं, ये अलग चीज़ें हैं — URL-एन्कोडिंग (percent-encoding) हर स्पेशल बाइट को %XX फ़ॉर्मेट में बदलती है, जबकि URL-सेफ़ Base64 एक अलग एन्कोडिंग स्कीम है जो सिर्फ़ + और / को - और _ से बदलती है ताकि URL में सुरक्षित रहे।
क्या यह टूल मेरा टेक्स्ट या URL कहीं भेजता है?
नहीं, एन्कोडिंग/डिकोडिंग पूरी तरह आपके ब्राउज़र में होती है, कोई डेटा सर्वर पर नहीं जाता।
डबल एन्कोडिंग क्या है और इसे कैसे पहचानें?
यह एक गलती है जिसमें पहले से एन्कोड की गई स्ट्रिंग को दोबारा एन्कोड कर दिया जाता है — % वर्ण खुद %25 में बदल जाता है, और %20, %2520 बन जाता है। इसकी पहचान डिकोड किए गए नतीजे में %25XX जैसे अनुक्रमों से होती है।
स्पेस कभी + तो कभी %20 के रूप में क्यों एन्कोड होता है?
स्पेस के लिए + application/x-www-form-urlencoded फ़ॉर्मेट का हिस्सा है, जिसे फ़ॉर्म और क्वेरी स्ट्रिंग इस्तेमाल करते हैं। %20 RFC 3986 का स्टैंडर्ड percent-encoding है, जो URL के किसी भी हिस्से में सही रहता है।