🔗
URL Encoder / Decoder
Encode special characters or decode %xx sequences instantly
Ctrl+Enter = encode
Result appears here

URL Encoder & Decoder

Free online URL encoder and decoder. Percent-encode special characters in URLs or decode URL-encoded strings for safe web transmission.

Free No login 100% browser-based No data sent to servers

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 or decodes URL components using the standard RFC 3986 percent-encoding rules, matching exactly what encodeURIComponent() does in JavaScript. 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 are spaces encoded as %20 or +?
%20 is the standard percent-encoded form of a space (used in path segments). + represents a space specifically in the application/x-www-form-urlencoded format used by HTML forms. Modern APIs prefer %20 everywhere. If you see + in a URL query string, decode it as a space.
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: / ? & = + @ : ; , $ !

Also available as

✓ Copied!