URL Encoder/Decoder
Trending 🔥Encode and decode URLs
How to Use URL Encoder/Decoder
- 1Paste your text
- 2Click Encode to convert to URL format, or Decode to convert back
- 3Copy the result
About URL Encoder/Decoder
URL Encode & Decode converts text to and from URL encoding (also known as percent encoding). URL encoding replaces special characters with a % followed by their two-digit hexadecimal code, making strings safe to include in URLs without breaking their structure.
This tool is essential for working with query parameters, form data, API requests, and debugging URL-encoded strings. Characters like spaces, &, =, ?, and # have special meaning in URLs — encoding them ensures they are interpreted as data rather than URL syntax.
All encoding and decoding runs instantly in your browser with no server round-trip.
Key Features of URL Encoder/Decoder
- Encode text to URL-safe percent-encoded format instantly
- Decode percent-encoded strings back to readable text
- Supports both encodeURIComponent and full URI encoding modes
- Handles Unicode characters, spaces, and all special characters
- One-click copy for encoded and decoded output
- Works entirely in-browser — no data is sent to any server
- Instant results with no submit button required
- Useful for debugging malformed URLs and query strings
Supported Formats
Input Formats
Output Formats
Uses encodeURIComponent / decodeURIComponent semantics — safe for encoding individual query parameter values.
Examples
Encode a search query for use in a URL
Make a user-entered search term safe to append to a URL query string.
Input
hello world & more
Output
hello%20world%20%26%20more
Decode a percent-encoded API parameter
Convert a percent-encoded string from an API log back to readable text.
Input
email%3Duser%40example.com%26name%3DJohn%20Doe
Output
email=user@example.com&name=John Doe
Common Use Cases
- Encoding user-submitted form data before appending to a URL
- Decoding percent-encoded query parameters in API logs for debugging
- Preparing special characters for use in redirect URLs
- Encoding email addresses or JSON values for URL query strings
- Debugging broken URLs that contain unencoded reserved characters
- Preparing URL parameters for OAuth 1.0 signature base strings
Troubleshooting
Spaces appear as + instead of %20
Solution
Plus signs (+) encode spaces in application/x-www-form-urlencoded format. Use %20 for spaces in standard URL encoding.
Encoding a full URL changes the slashes and colons
Solution
Only encode individual parameter values with encodeURIComponent, not entire URLs.
Double-encoded strings like %2520 appear in the output
Solution
This happens when you encode an already-encoded string. Decode first, then re-encode.
Frequently Asked Questions
What is URL encoding?
URL encoding (percent encoding) converts characters not allowed in URLs to a % followed by their two-digit hex code. For example, a space becomes %20 and an ampersand becomes %26.
When do I need URL encoding?
You need URL encoding whenever you pass special characters (spaces, &, =, ?, #) as values in query strings, form submissions, or API parameters.
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a complete URL and leaves structural characters (/, :, ?, #, &) intact. encodeURIComponent encodes everything including those structural characters, making it suitable for individual query parameter values.
Why does a space sometimes appear as + in URLs?
The + sign is an older, HTML form-specific way to encode spaces. Standard percent encoding uses %20. Both are widely used, but %20 is correct per RFC 3986.
Is URL encoding the same as Base64 encoding?
No. URL encoding converts characters to %XX hex format for URLs. Base64 encoding converts binary data to printable ASCII for text-based protocols.
Can I encode an entire URL?
You can, but typically you should only encode individual query parameter values. Encoding a full URL will also encode the scheme and slashes, making it invalid.
Is my data sent to a server?
No. All encoding and decoding is performed locally in your browser. No data is transmitted or stored.
What characters are not encoded?
Unreserved characters — letters (A–Z, a–z), digits (0–9), hyphen (-), underscore (_), period (.), and tilde (~) — are never encoded as they are safe in URLs.