URL Encoder
Encode URLs and query string parameters with percent-encoding. Free online URL encoder, no signup needed, runs in your browser.
Encode URLs and Query Parameters for Safe Transmission
URLs can only contain a limited set of characters that are safe for transmission across all internet infrastructure. Characters outside this safe set—spaces, non-ASCII characters, special symbols like `&`, `=`, `?`, and `#`—must be percent-encoded before they can appear in a URL. Percent encoding (also called URL encoding) replaces each unsafe character with a `%` sign followed by the two-digit hexadecimal value of that character's ASCII code. A space becomes `%20`, a hash becomes `%23`, an equals sign becomes `%3D`.
Our free URL encoder handles this transformation instantly. Enter any text, URL component, or query parameter value, click Encode, and get the correctly percent-encoded output ready to use in a URL, HTTP request, or API call. The encoder handles both standard ASCII characters and Unicode characters (encoding them as UTF-8 byte sequences).
Why URL Encoding Is Required
The URL specification (RFC 3986) defines a limited set of characters that can appear unencoded in a URL: letters, digits, and a small set of symbols (`-`, `_`, `.`, `~`, and in structural positions: `/`, `?`, `#`, `[`, `]`, `@`, `!`, `$`, `&`, `'`, `(`, `)`, `*`, `+`, `,`, `;`, `=`, `:`). Any other character must be percent-encoded because it either has reserved structural meaning in URLs, is not safe for transmission through all network layers, or is simply not part of the defined URL character set.
The practical consequence is that user-supplied text—search queries, form values, path parameters, file names—cannot be directly inserted into URLs without encoding. A search for "AT&T price" contains an ampersand, which in a URL marks the boundary between query parameters. Without encoding, `?q=AT&T price` would be parsed as two parameters: `q=AT` and `T price`. With encoding: `?q=AT%26T%20price` correctly passes the full string as a single query parameter value.
Encoding Query Parameters vs. Encoding Complete URLs
The scope of what you encode depends on what you're working with. When you're encoding a complete URL that already has structural characters in their correct positions (the `://`, `/` path separators, `?` query delimiter, `&` parameter separators), you want to preserve those structural characters unencoded while encoding only the values within the URL. When you're encoding a single query parameter value that contains user-supplied text, you want to encode everything including characters like `&`, `=`, `+`, and `?` that would otherwise be misinterpreted as URL structure.
In JavaScript, this distinction is handled by two different functions: `encodeURI()` encodes a complete URL and preserves structural characters, while `encodeURIComponent()` encodes a single value and encodes all characters that have structural meaning. The equivalent distinction exists in most programming languages through separate encoding functions. Our encoder applies the component encoding (all special characters encoded), which is the correct approach for encoding individual values before assembling them into a URL.
Common URL Encoding Scenarios
Search Queries and UTM Parameters
Marketing URLs with UTM tracking parameters frequently contain spaces, slashes, and special characters in the campaign name and content values. `utm_campaign=Summer Sale 2025` must be encoded as `utm_campaign=Summer%20Sale%202025` before being appended to a URL. Our encoder handles this in one step for any parameter value containing characters that need encoding.
API Request Parameters
REST APIs that accept user-supplied text in query parameters require that text to be URL-encoded before it's included in the request URL. A search API accepting a query parameter containing a forward slash, plus sign, or non-ASCII characters will produce incorrect results or fail entirely if those characters are not encoded. Encoding the value before constructing the request URL ensures the API receives exactly the text you intended.
Internationalized URLs
Non-ASCII characters in URL path segments or query parameters—accented characters, Chinese, Arabic, Japanese, emoji—must be encoded as UTF-8 byte sequences represented in percent notation. The character "é" is encoded as `%C3%A9` (the two bytes of its UTF-8 representation, each represented as a hex pair). Our encoder correctly handles Unicode characters through this UTF-8 percent-encoding process.
Free, Private, and Instant
The URL encoder runs entirely in your browser. No text you encode is transmitted to any server or stored anywhere. The tool is completely free with no account required and works on any device with a modern browser.