How to URL Encode a String Online
URL encode any string to make it safe for use in URLs and query parameters. Free, instant, and private.
Steps
Open the Base64 Encoder
Navigate to the Base64 Encoder tool and select the URL Encode mode.
Enter the string to encode
Paste or type the string that contains special characters you need to encode for use in a URL.
Copy the encoded result
The URL-encoded string appears instantly with special characters replaced by percent-encoded equivalents (e.g., space becomes %20).
Why URL Encoding Matters
URLs have a strict character set defined by RFC 3986. Characters like spaces, ampersands, and Unicode characters must be percent-encoded to be transmitted correctly. Failing to encode these characters can break links, corrupt query parameters, or cause security issues like injection attacks.
Frequently Asked Questions
Characters outside the unreserved set (A-Z, a-z, 0-9, -, _, ., ~) should be percent-encoded when used in URL components. This includes spaces, ampersands, equal signs, and non-ASCII characters.
encodeURI encodes a full URI but preserves characters like : / ? # that are valid in URIs. encodeURIComponent encodes everything except unreserved characters, which is what you want for query parameter values.