URL Encoder / Decoder
Percent-encode special characters in URLs or decode encoded strings back to human-readable text. Instant and free.
How to Use
Paste Your Text or URL
Type or paste any URL, query string, or text containing special characters into the Input field. The character count updates automatically as you type.
Encode or Decode
Click "Encode URL" to percent-encode special characters (spaces become %20, & becomes %26, etc.). Click "Decode URL" to convert an already-encoded URL back into a human-readable string.
Use Real-Time Mode (Optional)
Enable "Encode as you type" to automatically encode your input on every keystroke. This is useful when building URLs dynamically and you want to see the encoded form immediately.
Copy the Result
Click the "Copy" button next to the output area to copy the encoded or decoded result to your clipboard. You can then paste it directly into your code, browser address bar, or wherever you need it.
URL Encoder and Decoder — Encode and Decode URLs and Query Strings
URLs can only contain a specific set of characters — letters, numbers, and a few safe symbols like hyphens and underscores. When you need to include other characters (spaces, special symbols, non-English text, or anything with a special meaning in a URL), those characters must be percent-encoded. This tool encodes and decodes URL components accurately.
What is URL encoding?
Percent encoding (also called URL encoding) replaces unsafe characters with a percent sign followed by the hexadecimal code for that character. A space becomes %20 (or + in form encoding). A question mark becomes %3F. A forward slash becomes %2F. This ensures the URL is interpreted correctly by web browsers and servers, which use certain characters (like ?, &, =, and /) as structural delimiters.
Common use cases
Building query strings in code: When constructing a URL with search parameters programmatically, user input needs to be encoded before being included in the query string. A search for "laptop below ₹50,000" should become q=laptop+below+%E2%82%B950%2C000 in the URL — the rupee symbol and comma are encoded.
Debugging broken URLs: If a URL is failing or redirecting incorrectly, check whether special characters in query parameters are properly encoded. Paste the raw parameter value here to encode it, then test the URL with the encoded version.
API development and testing: When sending requests to REST APIs, query parameters with special characters must be encoded. This tool lets you encode the parameter value before building the full URL for a manual test.
Handling Hindi and Indian language text in URLs: URLs for pages in Hindi or other Indian languages often contain Devanagari or other script characters, which are percent-encoded in the actual URL (though browsers display the decoded version in the address bar). Decode a URL containing %E0%A4%A8%E0%A4%AE%E0%A4%B8%E0%A5%8D%E0%A4%A4%E0%A5%87 to see what it actually says.
Sharing links with parameters: Sometimes a URL copied from a browser is already encoded, but when you paste it into a message it looks garbled. Decode it to see the plain text version, or ensure the link is properly encoded before sharing.
Understanding log files: Web server access logs often contain percent-encoded URLs. Decode the URL to understand what the user was actually requesting.
Encoding vs. full URL encoding
There are two common encoding functions: encodeURIComponent() encodes everything except letters, digits, and - _ . ! ~ * ' ( ) — suitable for encoding a single query parameter value. encodeURI() encodes everything except the characters that have meaning in a complete URL, so it preserves ://, ?, &, =, etc. This tool lets you choose which mode to apply.
Use encodeURIComponent()-style encoding when encoding a single value that will be a parameter value. Use encodeURI()-style when encoding an entire URL that's already structured.
Tips
Paste just the value you want to encode, not the entire URL, when encoding a single query parameter. Then insert the encoded value into the correct position in your URL template.
When decoding, paste the encoded string including any %XX sequences. The tool will decode all percent-encoded characters back to their original form.
Limitations
This tool doesn't parse or validate full URLs — it encodes/decodes the text you give it. If you paste a complete URL and encode it all, the structural characters (://, ?, =) will be encoded too, which is usually not what you want. Encode only the values that need encoding.
Some platforms (social media, email clients) may further modify URLs — shortening them, adding tracking parameters, or re-encoding them. The encoding you apply here may not survive all platform transformations.
Frequently Asked Questions
URL encoding (also called percent-encoding) is a method of representing special characters in a URL using a percent sign followed by two hexadecimal digits. For example, a space becomes %20, an ampersand becomes %26, and a forward slash becomes %2F. It ensures that URLs remain valid across all systems, browsers, and servers.
You should encode a URL whenever it contains characters that have special meaning in URL syntax (like &, ?, =, #) or characters that are not allowed in URLs (like spaces, non-ASCII characters, and certain punctuation). This is especially important when passing user-generated text as query parameters, embedding URLs in HTML, or making HTTP requests programmatically.
Characters that must be encoded include spaces, non-ASCII characters (like accented letters or Chinese characters), and reserved characters with special URL meaning: ! # $ & ' ( ) * + , / : ; = ? @ [ ]. Safe characters that do not need encoding are letters (A–Z, a–z), digits (0–9), and the symbols - _ . ~.
encodeURI() encodes a complete URL but leaves characters that are valid URL delimiters unencoded (like / ? & = # :). encodeURIComponent() — which this tool uses — encodes everything except letters, digits, and - _ . ! ~ * ' ( ). Use encodeURIComponent when encoding a value that will be inserted into a URL as a query parameter, so that delimiters in the value do not break the URL structure.
This tool encodes or decodes the entire content of the input box as a single string. To process multiple URLs, paste them one at a time, or separate them with a delimiter that will not interfere with the encoding. For bulk URL processing, consider using a script with JavaScript's decodeURIComponent() function in a loop.