Toolypet
डेव टूल्स/URL एन्कोडर/डिकोडर

URL एन्कोडर/डिकोडर

URL घटकों और क्वेरी स्ट्रिंग्स को एन्कोड या डिकोड करें

इनपुट

आउटपुट

परिणाम यहाँ दिखाई देगा...

विकल्प

URL Encoding Guide

Learn how to encode and decode URLs properly

What is URL Encoding?

URL encoding converts characters into a format that can be safely transmitted over the Internet. Special characters like spaces, &, ?, and = are converted to percent-encoded values (e.g., space becomes %20).

How to Use This Tool

  1. Enter a URL or text containing special characters
  2. Choose between full URL encoding or component encoding
  3. Click 'Encode' or 'Decode' as needed
  4. Copy the result using the copy button

Pro Tips

  • Use 'Encode Component' for query parameter values only
  • Full URL encoding preserves the URL structure (://, /, etc.)
  • Always encode user input before adding it to URLs to prevent injection

Browser Support

URL encoding uses the standard encodeURIComponent() and encodeURI() functions available in all modern browsers.

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

URL एन्कोडिंग क्यों आवश्यक है?

URL में केवल ASCII कैरेक्टर्स की अनुमति है। स्पेस, स्पेशल कैरेक्टर्स और नॉन-ASCII कैरेक्टर्स को % के बाद हेक्स वैल्यू में बदलना होता है। उदाहरण: स्पेस %20 बनता है। बिना एन्कोडिंग URL टूट सकता है।

encodeURI और encodeURIComponent में क्या अंतर है?

encodeURI पूरे URL के लिए है, :, /, ? जैसे URL स्ट्रक्चर कैरेक्टर्स को संरक्षित करता है। encodeURIComponent सब कुछ एन्कोड करता है, क्वेरी पैरामीटर वैल्यू के लिए उपयुक्त है। गलत चुनाव से URL टूट सकता है।

डबल एन्कोडिंग क्या है?

डबल एन्कोडिंग तब होती है जब पहले से एन्कोडेड स्ट्रिंग को फिर से एन्कोड किया जाता है। उदाहरण: %20 बनता है %2520। यह समस्या पैदा करता है। सुनिश्चित करें कि डेटा एक बार ही एन्कोड हो।

कौन से कैरेक्टर्स URL में सुरक्षित हैं?

अनरिज़र्व्ड कैरेक्टर्स (A-Z, a-z, 0-9, -, _, ., ~) को एन्कोड करने की आवश्यकता नहीं है। रिज़र्व्ड कैरेक्टर्स (:, /, ?, #, @, आदि) का URL में विशेष अर्थ है। डेटा में इन्हें एन्कोड करना होता है।

UTF-8 कैरेक्टर्स को कैसे एन्कोड करें?

JavaScript का encodeURIComponent ऑटोमैटिक UTF-8 हैंडल करता है। प्रत्येक UTF-8 बाइट को %XX फ़ॉर्मेट में बदला जाता है। उदाहरण: 'हिंदी' एन्कोड होता है। यह टूल UTF-8 को सही तरीके से हैंडल करता है।