URL Encode Decode
Encode and decode URLs instantly with our free online URL Encode/Decode tool. Whether you are a web developer handling query parameters, an API engineer working with HTTP requests, a data analyst processing web logs, or anyone who needs to safely transmit special characters in URLs, this tool provides instant, accurate conversion in both directions. URL encoding converts special characters into a format that can be safely transmitted over the internet, while URL decoding reverses this process to recover the original text. Simply paste your URL or string and get the encoded or decoded result in real-time. The tool handles Unicode characters, spaces, symbols, and all special characters defined in RFC 3986. Input your data and click the corresponding button to transform it instantly.
What Is
A URL Encode/Decode tool converts text between its original form and URL-encoded format as defined by RFC 3986 (Uniform Resource Identifier syntax). URL encoding (also called percent-encoding) replaces unsafe or reserved characters in a URL with a percent sign (%) followed by two hexadecimal digits representing the character's ASCII value. This is necessary because URLs can only contain a limited set of characters from the ASCII alphabet. Characters like spaces, ampersands, question marks, equals signs, and non-ASCII characters must be encoded to be included in URLs without changing their meaning. Our free online URL Encode/Decode tool handles both encoding and decoding operations. It supports encoding individual strings, full URLs, and query parameters. The decoder correctly handles standard percent-encoding, plus signs representing spaces (application/x-www-form-urlencoded format), and Unicode UTF-8 encoded characters. All processing happens locally in your browser for instant results and complete privacy — your data never leaves your device.
How to Use
- Paste your URL or text string into the input field. For encoding, this can be a raw URL with special characters. For decoding, paste the percent-encoded string.
- Click the encode button to convert special characters to their percent-encoded equivalents (%20 for spaces, %3F for question marks, etc.).
- Or click the decode button to convert percent-encoded strings back to their readable original form.
- Use the swap button to quickly switch between encoding and decoding modes, reversing the current input and output.
- Copy the result to your clipboard with one click, or clear both fields to start a new encoding or decoding operation.
Examples
Input: Encode: hello world & goodbye
Process: Replace space→%20, &→%26, non-ASCII→percent-encoding
Result: hello%20world%20%26%20goodbye
Input: Decode: %E4%BD%A0%E5%A5%BD%E4%B8%96%E7%95%8C
Process: Parse %hex pairs → Map to UTF-8 bytes → Decode to chars
Result: 你好世界
Related Searches
People also search for: URL encode, URL decode, URL encoder, URL decoder, percent encoding, URL encoding online.
URL encodeURL decodeURL encoderURL decoderpercent encodingURL encoding onlinedecode URLencode URLURL converterURL escapeURL unescapequery string encoderURL toolweb development toolURI encoderURL encoding decoderURL format toolparameter encoder
Frequently Asked Questions
What is URL encoding and when do I need it?
URL encoding (percent-encoding) converts characters that have special meaning in URLs into a format that can be safely transmitted. You need URL encoding whenever including user input in query parameters, building URLs dynamically with variable content, submitting form data via GET requests, or passing special characters in API endpoints. Without proper encoding, characters like &, =, ?, #, and spaces can break URLs by being interpreted as URL structure rather than data. For example, a space in a search query must be encoded as %20 or + to work correctly in the URL.
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URL but preserves characters that are part of URL syntax (:/?#[]@!$&'()*+,;=). It is used when you have a complete URL that may contain characters needing encoding in the path. encodeURIComponent encodes everything except the most basic characters (A-Z a-z 0-9 - _ . ! ~ * ' ( )), making it suitable for encoding query parameter values where even reserved characters like & and = must be escaped. Use encodeURI for full URLs and encodeURIComponent for query string parameters and other URL components.
How does URL encoding handle spaces?
Spaces can be encoded in two ways in URLs. The standard URL encoding represents a space as %20. However, in the application/x-www-form-urlencoded format used by HTML forms, spaces are represented by plus signs (+). Our tool handles both conventions — encoding produces %20 by default, and decoding correctly interprets both %20 and + as spaces. When encoding form data for submission, the + format is more appropriate, while %20 is standard for URL path components and query strings.
Can I encode non-ASCII or Unicode characters?
Yes, our tool fully supports Unicode and non-ASCII character encoding. Characters from any language or script are encoded using UTF-8 byte sequences. For example, the Chinese character 中 is encoded as %E4%B8%AD, the Japanese character あ as %E3%81%82, and emoji like 😀 as %F0%9F%98%80. The decoder also correctly recognizes and converts these UTF-8 percent-encoded sequences back to their original Unicode characters. This makes the tool suitable for international URLs and multilingual applications.
Is URL encoding the same as base64 encoding?
No, URL encoding (percent-encoding) and base64 encoding are completely different methods. URL encoding replaces individual unsafe characters with percent-encoded equivalents while leaving safe characters unchanged. Base64 encoding converts binary data into a string of 64 ASCII characters (A-Z, a-z, 0-9, +, /) and is typically used for embedding binary data like images in data URIs. URL encoding is used for making URLs safe, while base64 is used for data representation. If you need to include binary data in a URL, you would typically base64-encode it and then URL-encode the result.