Free URL Encode & Decode Online - URL Encoder/Decoder
Encode and decode URLs online for free. Convert special characters to URL-safe format (percent-encoding) and back—essential for web developers, SEO specialists, and anyone working with URLs. No signup required.
What Is URL Encoding?
URL encoding (also called percent-encoding) converts special characters into a format safe for URLs. Since URLs can only contain a limited set of ASCII characters, any other characters must be represented as percent-encoded sequences.
For example:
- Space →
%20 &→%26?→%3F- Non-ASCII characters → UTF-8 byte sequences
How to Use
Encoding
- Enter your URL or text - Paste content with special characters
- Click "Encode" - Convert to URL-safe format
- Copy result - Use the encoded string in URLs
Decoding
- Paste encoded URL - Enter percent-encoded string
- Click "Decode" - Convert back to readable text
- View result - See the original content
Key Features
- Instant conversion - Real-time encoding/decoding
- Full Unicode support - Handles international characters
- Preserve structure - Optionally encode/skip certain characters
- No limits - Process any URL length
- Privacy-first - All processing in your browser
- One-click copy - Easy clipboard access
Why URL Encoding Is Necessary
URLs have a strict syntax defined by RFC 3986. Only these characters are safe in URLs:
Unreserved Characters (Never Encoded)
A-Z a-z 0-9 - _ . ~
Reserved Characters (Special Meaning)
! # $ & ' ( ) * + , / : ; = ? @ [ ]
Unsafe Characters (Must Be Encoded)
- Spaces →
%20or+ <>→%3C%3E{}→%7B%7D|\→%7C%5C^~→%5E%7E- International characters → UTF-8 bytes
Common Encoding Examples
| Character | Encoded | Description |
|---|---|---|
| (space) | %20 | Most common |
| & | %26 | Query separator |
| = | %3D | Key-value delimiter |
| ? | %3F | Query string start |
| / | %2F | Path separator |
| # | %23 | Fragment identifier |
| + | %2B | Plus sign |
| @ | %40 | At symbol |
| % | %25 | Percent sign itself |
Use Cases
Web Development
- API parameters - Encode query string values
- Form submissions - Handle special characters
- Link building - Create valid URLs
- Redirect URLs - Encode callback URLs
- Analytics tracking - UTM parameters
SEO & Marketing
- UTM tracking - Encode campaign parameters
- Redirect chains - Safe URL passing
- Dynamic URLs - Clean URL generation
- Social sharing - Encode share URLs
- URL shorteners - Original URL encoding
Data Operations
- API requests - Proper parameter encoding
- OAuth flows - Redirect URI handling
- Webhook URLs - Secure callback patterns
- File downloads - Handle filenames with spaces
- Search queries - Pass search terms in URLs
Debugging
- Test API calls - Verify encoding
- Debug redirects - Decode nested URLs
- Analyze failures - Find encoding issues
- Review logs - Decipher encoded URLs
Understanding Encoding Depth
Sometimes URLs are encoded multiple times:
Single Encoding
Hello World → Hello%20World
Double Encoding (Problematic)
Hello%20World → Hello%2520World
If you decode and see % characters still, the URL was double-encoded.
URL Components and Encoding
https://example.com/path/to/page?query=value&foo=bar#section
\___/ \_________/\___________/ \_________________/ \_____/
scheme host path query string fragment
Each component has different encoding rules:
- Path: Encode most special characters
- Query string values: Encode
&,=, spaces - Fragment: Generally treated like query string
JavaScript Encoding Functions
| Function | Purpose | Example |
|---|---|---|
encodeURIComponent() | Encode query parameters | Most common use |
encodeURI() | Encode full URL (preserves structure) | Less aggressive |
escape() | Deprecated | Don't use |
Frequently Asked Questions
What's the difference between encoding and encrypting?
URL encoding is for format compatibility, not security. Anyone can decode it. Encryption protects data from unauthorized access.
Should I encode the entire URL?
No! Only encode the parts that contain special characters—typically query string values, path segments with special characters, or fragment identifiers.
Why is my URL not working after encoding?
Common issues:
- Double encoding (encoding already-encoded URLs)
- Using wrong encoding function
- Encoding parts that shouldn't be encoded (like
://)
What's the difference between %20 and +?
Both represent spaces. %20 is standard percent-encoding. + is used in application/x-www-form-urlencoded (form submissions). Modern practice prefers %20.
How do I handle international characters?
International characters are first converted to UTF-8 bytes, then each byte is percent-encoded. Example: 日 → %E6%97%A5
Can I encode/decode entire URLs at once?
Be careful—encoding reserved characters like :// breaks URL structure. Encode only the values/segments that need it.