URL Encoder/Decoder
Encode and decode URLs.
📚 Quick Examples
💡 When to Use URL Encoding:
- Query Parameters: Encoding search terms, filters, and parameters in URLs
- Special Characters: Spaces, &, =, ?, #, %, and non-ASCII characters
- API Requests: Properly formatting URLs for REST APIs
- Form Submissions: Encoding form data in GET requests
- SEO & Analytics: Clean URLs with encoded UTF-8 characters
- Email Links: Encoding subject lines and body text in mailto: links
🔤 Common Character Encodings
How to Use URL Encoder/Decoder Tool
Encode and decode URLs instantly with our free tool. Convert special characters, spaces, and symbols into URL-safe format. Perfect for web developers, SEO professionals, and anyone working with URLs. Supports bulk processing, UTF-8 characters, and bidirectional conversion.
Getting Started with URL Encoding
URL encoding (percent-encoding) converts special characters into a format that can be safely transmitted in URLs.
- Enter Text: Paste URLs, query strings, or any text that needs encoding
- Encode: Click "Encode URL" to convert special characters to %XX format
- Decode: Click "Decode URL" to convert %XX format back to readable text
- Bulk Processing: Enter multiple URLs (one per line) to process all at once
- Copy Result: Click copy button to use encoded/decoded text
- Swap: Exchange input and output to continue processing
- Examples: Click example cards to see encoding in action
What is URL Encoding and Why Is It Needed?
URLs can only safely transmit certain ASCII characters. Other characters must be encoded.
- Reserved Characters: Special characters like ?, &, =, #, /, : have specific meanings in URLs and must be encoded when used as data
- Unsafe Characters: Spaces, quotes, <, >, {, } can break URLs or cause security issues
- Non-ASCII: Characters like é, ñ, 中 must be encoded as UTF-8 bytes
- Space Encoding: Space becomes %20 (or + in query strings)
- Example: "hello world" becomes "hello%20world"
- Use Cases: Search queries, form data, API parameters, email links
Common URL Encoding Use Cases
When and where you need to use URL encoding in web development:
- Query Parameters: Encoding search terms: ?q=hello%20world&filter=tech%20news
- Form Submissions: GET requests with form data: name=John%20Doe&email=user%40example.com
- API Requests: REST APIs require encoded parameters: /api/search?term=caf%C3%A9
- Email Links: mailto: links with subject/body: mailto:user@example.com?subject=Hello%20World&body=Message%20here
- Social Sharing: Pre-filled social media posts with encoded text
- Analytics: UTM parameters with encoded campaign names
- Redirects: Passing URLs as parameters: ?redirect=https%3A%2F%2Fexample.com
- File Downloads: Filenames with spaces or special characters in download URLs
Understanding Percent Encoding Format
How the %XX encoding format works and what it represents:
- Format: Percent sign (%) followed by two hexadecimal digits
- Example: Space = %20 (hex 20 = decimal 32 = space in ASCII)
- UTF-8: Non-ASCII characters use multiple bytes: café = caf%C3%A9
- Case Insensitive: %20 and %20 are the same (uppercase preferred)
- Reserved vs Unreserved: A-Z, a-z, 0-9, -, _, ., ~ are safe (never encoded)
- Must Encode: Space ! " # $ % & ' ( ) * + , / : ; = ? @ [ ]
- Double Encoding: Encoding already encoded URLs creates %25XX format
Encoding vs Decoding: When to Use Each
Understanding when to encode versus decode URLs:
- Encode Before: Sending data to server, creating shareable links, building API requests, generating email links
- Decode After: Reading query parameters, debugging URLs, displaying to users, extracting data from URLs
- Do Not Double Encode: Check if URL is already encoded before encoding again
- Security: Always validate decoded URLs before using them (prevent injection attacks)
- Logging: Decode URLs in logs for readability, keep encoded in storage
FAQ
What is the difference between URL encoding and Base64 encoding?
Should I encode the entire URL or just the parameters?
Why does space become %20 sometimes and + other times?
What happens if I encode an already encoded URL?
Can this tool handle non-English characters?
Is URL encoding the same as HTML encoding?
How do I encode URLs in my programming language?
Why do I see %2F in some URLs instead of /?
Can I use this tool for encoding email addresses?
Does URL encoding affect SEO?
Related tools
Pro tip: pair this tool with ASCII Art Generator and Small Text Generator for a faster SEO workflow.