Practical Examples
This page provides quick, practical examples you can copy and use immediately with the URL Encoder/Decoder tool.
Quick Start Examples
1. Basic Text Encoding
Input: Hello World!
Output: Hello%20World%21
2. Email Address
Input: user@example.com
Output: user%40example.com
3. Chinese Text
Input: 你好世界
Output: %E4%BD%A0%E5%A5%BD%E4%B8%96%E7%95%8C
4. Japanese Text
Input: こんにちは
Output: %E3%81%93%E3%82%93%E3%81%AB%E3%81%A1%E3%81%AF
Web Development Examples
5. Search Query
Input: JavaScript tutorials for beginners
Output: JavaScript%20tutorials%20for%20beginners
6. File Path
Input: /documents/my file (2024).pdf
Output: /documents/my%20file%20%282024%29.pdf
7. Query Parameters
Input: ?name=John Doe&age=30&city=New York
Output: %3Fname%3DJohn%20Doe%26age%3D30%26city%3DNew%20York
8. API Endpoint
Input: /api/users/123/profile?include=posts,comments
Output: /api/users/123/profile%3Finclude%3Dposts%2Ccomments
Social Media Examples
9. Twitter Share
Input: Check out this amazing tool! 🚀 #webdev
Output: Check%20out%20this%20amazing%20tool%21%20%F0%9F%9A%80%20%23webdev
10. Facebook Share
Input: https://example.com/page?ref=facebook&campaign=summer2024
Output: https%3A%2F%2Fexample.com%2Fpage%3Fref%3Dfacebook%26campaign%3Dsummer2024
E-commerce Examples
11. Product URL
Input: /products/Women's Running Shoes - Size 7.5
Output: /products/Women%27s%20Running%20Shoes%20-%20Size%207.5
12. Shopping Cart
Input: ?item=MacBook Pro 13" M2&color=Space Gray&storage=512GB
Output: %3Fitem%3DMacBook%20Pro%2013%22%20M2%26color%3DSpace%20Gray%26storage%3D512GB
Form Data Examples
13. Contact Form
Input: name=María José&email=maria@dominio.es&message=Hello there!
Output: name%3DMar%C3%ADa%20Jos%C3%A9%26email%3Dmaria%40dominio.es%26message%3DHello%20there%21
14. Registration Form
Input: username=john_doe&password=mySecurePass123!&confirm=mySecurePass123!
Output: username%3Djohn_doe%26password%3DmySecurePass123%21%26confirm%3DmySecurePass123%21
Analytics Examples
15. UTM Parameters
Input: ?utm_source=newsletter&utm_medium=email&utm_campaign=summer sale 2024
Output: %3Futm_source%3Dnewsletter%26utm_medium%3Demail%26utm_campaign%3Dsummer%20sale%202024
16. Google Analytics
Input: /track?event=purchase&value=299.99¤cy=USD&item=MacBook Pro
Output: /track%3Fevent%3Dpurchase%26value%3D299.99%26currency%3DUSD%26item%3DMacBook%20Pro
Authentication Examples
17. OAuth Redirect
Input: https://myapp.com/callback?code=abc123&state=xyz789
Output: https%3A%2F%2Fmyapp.com%2Fcallback%3Fcode%3Dabc123%26state%3Dxyz789
18. Login Form
Input: username=admin@company.com&password=SecurePass2024!
Output: username%3Dadmin%40company.com%26password%3DSecurePass2024%21
File Upload Examples
19. File Name
Input: Project Proposal (Final Draft).pdf
Output: Project%20Proposal%20%28Final%20Draft%29.pdf
20. File Path
Input: /uploads/Images/Screenshot 2024-01-15 at 10.30.15 AM.png
Output: /uploads/Images%2FScreenshot%202024-01-15%20at%2010.30.15%20AM.png
JSON Examples
21. JSON Data
Input: {"name":"John","age":30,"city":"New York"}
Output: %7B%22name%22%3A%22John%22%2C%22age%22%3A30%2C%22city%22%3A%22New%20York%22%7D
22. API Response
Input: {"status":"success","data":{"id":123,"message":"User created"}}
Output: %7B%22status%22%3A%22success%22%2C%22data%22%3A%7B%22id%22%3A123%2C%22message%22%3A%22User%20created%22%7D%7D
Decoding Examples
23. Decode URL
Input: https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20world
Output: https://example.com/search?q=hello world
24. Decode Form Data
Input: name%3DJohn%20Doe%26email%3Djohn%40example.com%26age%3D30
Output: name=John Doe&email=john@example.com&age=30
25. Decode Chinese Text
Input: %E6%88%91%E7%88%B1%E4%B8%AD%E5%9B%BD
Output: 我爱中国
Common Special Characters
26. Symbols and Punctuation
Input: Price: $29.99 (50% off!) & free shipping
Output: Price%3A%20%2429.99%20%2850%25%20off%21%29%20%26%20free%20shipping
27. Mathematical Expressions
Input: 2 + 2 = 4, 10 > 5, x ≠ y
Output: 2%20%2B%202%20%3D%204%2C%2010%20%3E%205%2C%20x%20%E2%89%A0%20y
28. Programming Code
Input: function hello() { console.log("Hello, World!"); }
Output: function%20hello%28%29%20%7B%20console.log%28%22Hello%2C%20World%21%22%29%3B%20%7D
Tips for Using These Examples
- Copy and Paste: Simply copy any input text and paste it into the tool
- Test Both Ways: Try encoding first, then decode to verify
- Check Results: Always verify the output matches your expectations
- Use History: The tool saves your conversions for easy reference
- Handle Errors: If decoding fails, the input might not be properly encoded
When to Use Each Example
- Examples 1-4: Basic text encoding for any application
- Examples 5-8: Web development and API integration
- Examples 9-10: Social media sharing and marketing
- Examples 11-12: E-commerce and online shopping
- Examples 13-14: Form processing and user input
- Examples 15-16: Analytics and tracking
- Examples 17-18: Authentication and security
- Examples 19-20: File management and uploads
- Examples 21-22: API data and JSON processing
- Examples 23-25: Decoding received data
- Examples 26-28: Special characters and technical content
These examples cover the most common use cases you'll encounter in web development, marketing, and data processing. Use them as starting points for your own projects!