🔗
URL Encoder / Decoder
encodeURIComponent, encodeURI, form or RFC 3986 encoding · edit query strings
Ctrl+Enter = encode
Result appears here

URL Encoder & Decoder

Free online URL encoder and decoder. Choose encodeURIComponent, encodeURI, form encoding or strict RFC 3986, decode any percent-encoded string, and split a URL's query string into a table you can edit.

Free No login 100% browser-based Your input never leaves your device

Try these next

What is a URL Encoder & Decoder?

URLs can only contain a limited set of ASCII characters. Any character outside that set — spaces, accented letters, symbols like &, =, and # — must be percent-encoded before being included in a URL. For example, a space becomes %20 and & becomes %26.

This tool encodes text the way JavaScript's encodeURIComponent() does by default, and can also encode a whole URL (encodeURI, leaving existing %XX escapes alone), form data with + for spaces, or strict RFC 3986 output. Use it to safely encode query string values, path segments, or entire URLs before passing them to an API or embedding them in HTML.

What characters need to be URL encoded?
Any character that isn't a letter (A–Z, a–z), digit (0–9), or one of - _ . ~ must be percent-encoded in URL components. Common ones: space → %20, & → %26, = → %3D, ? → %3F, # → %23.
What's the difference between %20 and + for spaces?
%20 is the correct encoding for spaces in URL paths. The + sign encodes spaces only in query strings (application/x-www-form-urlencoded format). When in doubt, use %20.
Should I encode the entire URL or just the parameters?
Encode only the parameter values, not the entire URL. Encoding the full URL will break the slashes and protocol separators. Use encodeURIComponent() for values, encodeURI() for full URLs.
What is the difference between URL encoding and Base64?
URL encoding (percent-encoding) converts unsafe characters to %XX format so they can be included in a URL (e.g. space becomes %20). Base64 encodes binary data as printable ASCII text, increasing size by 33%. Use URL encoding for URL parameters and query strings; use Base64 for encoding binary data in text channels like JSON or HTML.
When should I use encodeURI vs encodeURIComponent?
Use encodeURIComponent() for individual query parameter values — it encodes everything except letters, digits and - _ . ! ~ * ' ( ). Use encodeURI() for a full URL — it preserves structural characters like /, ?, &, and =. In practice, always use encodeURIComponent() for user-supplied values before appending to a URL.
Why does my URL contain %2520?
It has been encoded twice. A space becomes %20 the first time; encoding again turns the % into %25, giving %2520. Decode it twice to get the original text back, and in code make sure each value is encoded only once, right before it is added to the URL.
What characters must always be encoded in a URL?
RFC 3986 requires encoding of: space ( %20), < > # % { } | \ ^ [ ] ` and all non-ASCII characters. Characters with special URL meaning that must be encoded when used as data: / ? & = + @ : ; , $ !
✓ Copied!