Guide
Percent-encoding URLs and query parameters correctly
URLs can only contain a limited set of characters. Spaces, accents, emoji and characters that have a job in URLs, such as &, =, ? and #, must be percent-encoded when they appear as data. A space becomes %20, é becomes %C3%A9. Getting this wrong breaks links, cuts off search terms at an ampersand, or silently changes a redirect address. This tool encodes and decodes correctly and takes long URLs apart so you can read them.
Encoding
- Choose Encode.
- Pick the scope:
- Parameter value (encodeURIComponent): for text you put into a URL, such as a search query, a name or a return URL. It encodes everything except letters, digits and
- _ . ! ~ * ' ( ). - Whole URL (encodeURI): for a complete address that just contains spaces or non-ASCII characters. It keeps
: / ? & = #so the URL still works.
- Parameter value (encodeURIComponent): for text you put into a URL, such as a search query, a name or a return URL. It encodes everything except letters, digits and
- Optionally use Spaces as + for form-style query strings.
- Copy the result.
| Input | Parameter value | Whole URL |
|---|---|---|
rock & roll |
rock%20%26%20roll |
rock%20&%20roll |
café |
caf%C3%A9 |
caf%C3%A9 |
a/b?c=d |
a%2Fb%3Fc%3Dd |
a/b?c=d |
The first row shows why the scope matters: as a parameter value, an unencoded & would split the value in two.
Decoding
Choose Decode and paste encoded text or a full URL. Turn on Spaces as + when the data came from an HTML form or a search engine URL, where + stands for a space. If the text has a broken sequence, such as a lone % or %G1, you’ll get an error rather than a wrong result.
Taking a URL apart
When the input is a full URL, the tool lists its parts: protocol, host, path and fragment. It also shows a table of all query parameters with decoded values. That’s handy for:
- Reading UTM tracking parameters on marketing links.
- Finding the real destination hidden in a redirect parameter before you click.
- Debugging OAuth callbacks and API requests with many parameters.
Common mistakes
- Double encoding:
%2520in a URL means%20was encoded again. Decode twice to see what happened, then encode only once in the code. - Encoding the whole URL as a component:
https%3A%2F%2F…is right inside a parameter but breaks a link you want to click. - Building query strings by hand: in code, prefer a URL or URLSearchParams API, which encodes for you.
- Forgetting the fragment: everything after
#is never sent to the server.
Privacy
URLs often contain email addresses, tokens or session IDs. Encoding, decoding and parsing all happen in your browser.
Who encodes and decodes URLs
- Developers build query strings and debug redirects and OAuth flows.
- Marketers create and read UTM tracking links.
- SEO specialists check URLs with special characters and parameters.
- Support staff read long links customers send.
A complete example: a tracking link for a newsletter
- Start with the landing page:
https://example.com/spring-sale. - Encode each parameter value as a Parameter value: the campaign name Spring Sale 2026 becomes
Spring%20Sale%202026. - Build the link:
https://example.com/spring-sale?utm_source=newsletter&utm_campaign=Spring%20Sale%202026. - Paste the finished link and choose Decode to check the parameter table shows each value correctly.
Tips
- Encode values, not whole URLs, when building links by hand.
- Use lowercase, hyphenated campaign names to avoid encoding altogether.
Related tools
- Base64 Encoder for binary data in text form.
- HTML Encoder for text inside HTML pages.
- Slug Generator to make clean, readable URL paths.
- QR Code Generator to share a long URL as a scannable code.
Checked against the current version of the URL Encode / Decode on .

