URL Encoder and Decoder
URLs can only contain a limited set of characters. Spaces, ampersands, slashes inside values, Hindi text and emoji must be percent-encoded, as in "%20" for a space, or the link breaks or sends the wrong data.
The URL Encoder and Decoder converts text into its percent-encoded form and back. Choose whether you are encoding a single value, such as a search term in a query string, or a whole URL, and optionally write spaces as + for HTML form data.
Encoding a value versus a whole URL
Query value / path part encodes every character with a special meaning in URLs, including "/ ? & = #". Use it for a single value you are inserting into a link, such as a search term: "a b&c" becomes "a%20b%26c", so the & is not mistaken for the start of another parameter.
Whole URL keeps the characters that give a URL its structure, such as "/", "?", "&" and "=", and encodes only those that are not allowed, such as spaces. Use it to clean up a complete address that contains spaces or non-English characters.
Plus signs and decoding errors
In HTML form submissions, spaces are traditionally written as "+" rather than "%20". Tick "Spaces as +" when you need that format, or when decoding form data that uses it.
Decoding fails when the text contains a "%" that is not followed by two hexadecimal digits, for example "100%" on its own. The tool shows an error rather than guessing, so you can find and fix the bad sequence.
How to use this tool
- Choose Encode or Decode: Pick the direction.
- Choose what you are encoding: A single query value or path part, or a whole URL.
- Enter the text: The result appears instantly; tick "Spaces as +" for form data.
- Copy the result: Copy it, or use the result as the next input.
Features
- Encode and decode in one place
- Query-value mode and whole-URL mode
- Optional + for spaces
- Clear error for invalid encoding
- Runs in your browser
Worked examples
Encoding a query value
Put "a b&c" into ?q= safely.
space → %20, & → %26
Result: a%20b%26c
Decoding a path
Decode "a%2Fb%20c".
%2F → /, %20 → space
Result: a/b c
Who it is for
- Developers: Build query strings and debug encoded parameters.
- Marketers: Prepare UTM links with spaces or special characters.
- Support teams: Read long encoded URLs from logs and error reports.
Tips
- Encode each value separately, not the whole query string.
- Use + for spaces only in form-style data.
- Double-encoding turns %20 into %2520; encode once.
- Non-English characters become several %XX bytes; that is correct.
Frequently asked questions
What is URL encoding?
URL encoding, also called percent-encoding, replaces characters that are not allowed or have special meaning in a URL with % followed by two hex digits. A space becomes %20 and & becomes %26.
When should I encode a whole URL instead of a value?
Use whole-URL mode to tidy a full address that contains spaces or non-English characters while keeping its structure. Use value mode for anything you insert into a URL, such as a search term or parameter.
Why do I see %2520 in my link?
The text was encoded twice: %20 was encoded again, turning % into %25. Decode it once to get back to %20, and make sure your code encodes values only once.
Should spaces be %20 or +?
In paths and most URLs, use %20. In HTML form data and some query strings, + is also accepted for spaces. Tick "Spaces as +" only when the receiving system expects it.