URL encoder / decoder
Prepare query parameters, debug escaped links, and safely convert encoded values without leaving the browser.
About this tool
URL encoding — also called percent-encoding — converts characters that are not allowed or reserved in a URL into a safe representation: a percent sign followed by two hexadecimal digits. A space becomes %20, an ampersand becomes %26, an at-sign becomes %40, and a slash becomes %2F. Every URL has reserved characters that carry structural meaning: slashes separate path segments, question marks begin query strings, and ampersands separate query parameters. When a data value contains these characters they must be encoded so they do not break the URL structure. For example, a search query like q=hello world must become q=hello%20world before it is safe to include in a URL. Failing to encode parameter values that contain special characters will cause servers to misparse the request. This tool encodes and decodes both individual parameter values and full URL strings. It runs entirely in your browser — no network request is made. Use it to prepare query parameters, decode callback URLs from logs, and debug encoded values from browser developer tools.
- 1
Paste a URL or any text string into the input field.
- 2
Select Encode to percent-encode special characters, or Decode to convert encoded sequences back to plain text.
- 3
The result appears instantly in the output field.
- 4
Click Copy to copy the output, or Swap to reverse the operation.
Encode query parameters before adding them to links or redirects.
Decode incoming callback URLs to inspect actual values quickly.
Clean up copied URLs from logs, analytics, and browser devtools.
Encode a string with spaces
hello world & morehello%20world%20%26%20moreEncode a full URL query param
https://example.com/search?q=hello worldhttps%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dhello%20worldDecode an encoded string
hello%20world%20%26%20morehello world & moreDouble-encoding — %2520 instead of %25
Cause: You encoded a string that was already URL-encoded. Running encode twice turns %20 into %2520 because the first % becomes %25.
Fix: Decode the string first to get back to plain text, then encode it once. Or paste the original unencoded value directly.
Encoded slashes break the URL path
Cause: Encoding a full URL encodes the slashes and colons in the scheme and path (https:// becomes https%3A%2F%2F), which makes the URL unusable.
Fix: Only encode the query parameter values, not the entire URL. Encode individual values like search queries, names, or paths that appear inside parameters.
Plus sign (+) decoded as a space
Cause: In application/x-www-form-urlencoded format, + represents a space. If your value was encoded with this format, a + may decode incorrectly when using standard percent-decoding.
Fix: If the encoded value came from an HTML form, replace + with %20 before decoding to get the correct space character.
These answers explain common url encode/decode tasks, expected input formats, and edge cases so both visitors and search engines can understand what this tool does.
When should I URL encode a value?
You should URL encode values when they contain spaces, symbols, query parameters, or reserved characters that need to be safely included inside a URL or query string.
What is the difference between encoding a full URL and a query parameter?
A full URL may need selective encoding, while a query parameter value should usually be encoded completely so characters like spaces, ampersands, and equals signs do not break the query string structure.
Why do I see %20, %3A, or %2F in encoded URLs?
Those are percent-encoded representations of reserved characters. For example, spaces become %20, colons become %3A, and slashes become %2F.
Can this tool decode callback URLs from logs or browser redirects?
Yes. It is useful for inspecting copied redirect URLs, encoded query strings, and callback parameters so you can see the underlying readable values.
JavaScript has two pairs of functions: encodeURI/decodeURI for full URLs and encodeURIComponent/decodeURIComponent for individual query parameter values.
// Encode a query parameter value (most common use case)
const param = "hello world & foo=bar";
const encoded = encodeURIComponent(param);
console.log(encoded); // hello%20world%20%26%20foo%3Dbar
// Decode
const decoded = decodeURIComponent("hello%20world%20%26%20foo%3Dbar");
console.log(decoded); // hello world & foo=bar
// Encode a full URL (preserves ://?=& structure)
const url = "https://example.com/search?q=hello world";
const encodedUrl = encodeURI(url);
console.log(encodedUrl); // https://example.com/search?q=hello%20world
// Build a query string from an object
const params = new URLSearchParams({ q: "hello world", page: "1" });
console.log(params.toString()); // q=hello+world&page=1
console.log("?" + params.toString());See full JavaScript / Node.js examples →