URL Encoder & Decoder Online
Input & Options
Tips: Ctrl/Cmd + K focuses the input. Ctrl/Cmd + Enter repeats the last action. Alt + E encodes, Alt + D decodes.
Result
Advertisement
Release Updates
v1.1 (June 1, 2026)
- Added live encode/decode mode so results can update as you type.
- Added automatic decode suggestions when percent-encoded sequences such as
%20,%3D, or%26are detected. - Added recursive decoding for double-encoded values such as
%2520. - Added line-by-line batch processing and quick examples for query strings, OAuth redirects, UTM campaigns, and Unicode text.
What is URL encoding?
URL encoding, also called percent-encoding, converts characters that may be unsafe or ambiguous in a URL into a
percent sign followed by hexadecimal bytes. For example, a space is usually encoded as %20, a question
mark can become %3F, and an ampersand can become %26.
Encoding matters because URLs use some characters as structure. The ? starts a query string,
& separates query parameters, = separates keys and values, and # starts a
fragment. If those characters are part of your data, encode them so browsers, servers, and APIs read the value
correctly.
URL encoding vs URL decoding
Encoding turns readable text into URL-safe text. Decoding reverses the process so an encoded string can be read,
checked, or edited. For example, blue%20shoes%20%26%20bags decodes to
blue shoes & bags.
Use Encode before placing raw values into query parameters, redirect URLs, tracking links, or API requests. Use
Decode when you need to inspect an existing URL, troubleshoot a redirect, or understand a value such as
%3F, %2F, or %25.
When should you use encodeURI vs encodeURIComponent?
Use encodeURI for a whole URL when you want to preserve URL syntax characters such as
:, /, ?, #, and &. Use
encodeURIComponent for a single value, such as a query parameter, path segment, or form value.
In practice, encodeURIComponent is usually the safer choice for user-entered data because it encodes
separators that could otherwise change the meaning of the URL.
Full URL:
encodeURI("https://example.com/search?q=blue shoes")
Single query value:
encodeURIComponent("blue shoes & bags")
URL encoding table for common characters
Use this quick reference when checking encoded query strings, redirect URLs, form values, and tracking links.
| Character | Meaning | Encoded value |
|---|---|---|
| space | Space in text | %20 or + in form data |
& | Query parameter separator | %26 |
= | Key/value separator | %3D |
? | Start of query string | %3F |
# | Fragment identifier | %23 |
/ | Path separator | %2F |
+ | Plus sign or form-space marker | %2B |
@ | Email/user separator | %40 |
% | Percent sign | %25 |
é | UTF-8 character | %C3%A9 |
€ | Euro symbol | %E2%82%AC |
Reserved vs unreserved URL characters
Reserved characters have special meaning in URLs. Examples include :, /, ?,
#, [, ], @, !, $, &,
', (, ), *, +, ,, ;, and
=. Encode them when they are data rather than URL structure.
Unreserved characters are generally safe to leave as-is: letters, numbers, hyphen, period, underscore, and tilde
(A-Z, a-z, 0-9, -, ., _,
~).
Common URL encoding examples
%20means a space in normal percent-encoding.+can mean a space inapplication/x-www-form-urlencodedform data.%3Fdecodes to?, which normally starts a query string.%26decodes to&, which normally separates query parameters.%2520often means a value was double-encoded, because%25is an encoded percent sign.
Real-world URL encoding examples
Encoding a query parameter
If a search term contains spaces or symbols, encode the value before adding it to a URL.
Raw value: blue shoes & bags
Encoded: blue%20shoes%20%26%20bags
URL: https://example.com/search?q=blue%20shoes%20%26%20bags
Encoding a redirect URL
Redirect URLs often contain their own query strings, so they should be encoded before being placed inside another URL.
Raw redirect:
https://example.com/callback?token=abc&status=ok
Encoded redirect:
https%3A%2F%2Fexample.com%2Fcallback%3Ftoken%3Dabc%26status%3Dok
Fixing tracking links
Campaign names with spaces, percent signs, ampersands, or non-English characters should be encoded before being used in UTM parameters.
Real-world use cases
- UTM campaign links: Encode campaign names, content labels, and keyword values before adding them to tracking URLs.
- OAuth and SSO redirects: Encode callback URLs before passing them as
redirect_urivalues. - Email links: Encode subject lines and body text in
mailto:URLs so spaces and symbols survive correctly. - API requests: Encode user-entered filters, search terms, and IDs before appending them to request URLs.
- Debugging redirects: Decode nested redirect parameters to see where a link is sending users.
Common URL encoding errors
- Encoding a whole URL as a component: This turns
https://intohttps%3A%2F%2F, which is correct only when the URL is being used as a value inside another URL. - Double-encoding: Encoding
%20again produces%2520. Decode first if you are not sure whether a value is already encoded. - Forgetting form mode: Some form-encoded data uses
+for spaces. Decode with form mode when inspecting form submissions or legacy query strings. - Leaving separators inside values: Raw
&and=characters can split one value into multiple parameters.
FAQ
What’s the difference between encodeURI and encodeURIComponent?
encodeURI is for whole URLs and leaves URL syntax characters such as :, /, ?, #, and & alone. encodeURIComponent is for individual components like query values and encodes nearly all non-alphanumeric characters.
Why do spaces sometimes appear as + instead of %20?
In application/x-www-form-urlencoded contexts, such as HTML form submissions, spaces are encoded as +. General percent-encoding represents spaces as %20.
Which characters are considered reserved in URLs?
Reserved characters include :, /, ?, #, [, ], @, !, $, &, ', (, ), *, +, ,, ;, and =. These may need encoding when used as data rather than URL separators.
How do I avoid double-encoding?
Only encode raw values once. If you see %25 in output, you may have encoded an already-encoded percent sign. Decode first if unsure, then encode once.
What does %20 mean in a URL?
%20 represents a space character in percent-encoding.
What does %3F mean in a URL?
%3F represents a question mark. It is encoded when the question mark is data, not the start of a query string.
What does %26 mean in a URL?
%26 represents an ampersand. Encoding it prevents the value from being split into another query parameter.
Should I encode a full URL or only the parameter value?
Usually, encode only the parameter value. Encoding an entire URL can turn structural characters like :, /, ?, and & into data.
Why did %20 become %2520?
That usually means the value was encoded twice. The percent sign in %20 was encoded as %25, producing %2520.
Is URL encoding the same as Base64?
No. URL encoding makes text safe inside URLs. Base64 represents binary or text data using a different ASCII format.
