Encode and decode URLs instantly. Convert spaces to %20, special characters to percent encoding. Perfect for API requests, query parameters, and web development.
https://example.com/search?q=hello world
mailto:user@example.com?subject=Hello & Greeting
Price: $100 (20% off!)
https://example.com/cafΓ©/rΓ©sumΓ©.pdf
Convert spaces to %20 for valid URLs. When you paste "https://example.com/hello world" into a browser, it breaks. Use our encoder to convert it to "hello%20world". Essential for sharing URLs with spaces in filenames, search queries, or folder paths.
Building API requests? Use "Encode Component" for query string values. If you're passing user input like "Price: $100 & free shipping" as a URL parameter, encode it to %24100%20%26%20free. Prevents API errors from special characters (&, =, ?, #).
Google Analytics shows URLs as "example.com/caf%C3%A9"βhard to read! Paste encoded URLs here to decode them back to readable text "cafΓ©". Perfect for analyzing traffic sources, understanding UTM parameters, or debugging redirect URLs.
Creating mailto links with pre-filled subject/body? Encode special characters in subject lines. "Subject: Meeting @ 3PM (Conference Room #5)" becomes "Meeting%20%403PM%20%28Conference%20Room%20%235%29". Works on all email clients without errors.
Building a custom search URL? Encode user queries before adding to URL. "how to fix laptop?" becomes "how%20to%20fix%20laptop%3F". Use this for Google search URLs, site search features, or marketplace filters.
URLs with accents, emojis, or non-Latin characters need encoding. "cafΓ©.com/rΓ©sumΓ©.pdf" β "caf%C3%A9.com/r%C3%A9sum%C3%A9.pdf". Ensures URLs work across all browsers and servers. Required for international websites and multilingual content.
| Function | Use Case | What It Encodes |
|---|---|---|
encodeURI |
Full URLs | Spaces, accents; keeps :/?#&= |
encodeURIComponent |
Query params | Everything except A-Z, 0-9, -_.~ |
Example: For API query ?name=John & Jane, use encodeURIComponent on "John & Jane" β "John%20%26%20Jane". For full URL like https://example.com/cafΓ©, use encodeURI β "https://example.com/caf%C3%A9".
API Request:
Before: https://api.example.com/search?q=coffee shops near me
After: https://api.example.com/search?q=coffee%20shops%20near%20me
Google Search:
Before: https://google.com/search?q=c++ tutorial
After: https://google.com/search?q=c%2B%2B%20tutorial
File Download:
Before: https://cdn.example.com/files/2024 Report (Final).pdf
After: https://cdn.example.com/files/2024%20Report%20(Final).pdf