URL Encode Online – Free Percent-Encoding Tool
Convert special characters to URL-safe percent-encoded format in seconds. Base64 Shuttle encodes everything locally in your browser for fast, private results.
What Is URL Encoding?
URL encoding, formally known as percent-encoding, is a mechanism for encoding information in a Uniform Resource Identifier (URI). It replaces characters that are not allowed in a URL with a percent sign (%) followed by two hexadecimal digits representing the byte value. For example, a space character becomes %20, an ampersand (&) becomes %26, and a forward slash (/) becomes %2F when it needs to be escaped.
The URL specification (RFC 3986) defines which characters are safe to use directly in a URL and which must be encoded. Unreserved characters like letters, digits, hyphens, periods, underscores, and tildes do not need encoding. All other characters, including spaces, punctuation, and non-ASCII letters, must be percent-encoded to create a valid URL.
URL encoding is essential when constructing URLs dynamically, especially when user input is included in query parameters. Without proper encoding, special characters in the input could break the URL structure or cause unexpected behavior on the server.
How to URL Encode a String
- Open the encoder: Go to the URL Encode page on Base64 Shuttle. No signup or download is needed.
- Enter your text: Type or paste the string you want to encode. This could be a search query, a form field value, or any text with special characters.
- Click Encode: The tool instantly converts all unsafe characters to their percent-encoded equivalents. The result is a valid URL-safe string.
- Copy the output: Click the Copy button to save the encoded string to your clipboard. Paste it directly into your URL query parameters, API requests, or form submissions.
Key Features
- Standards-compliant: Follows RFC 3986 percent-encoding rules for full compatibility with browsers, servers, and APIs.
- Client-side encoding: All processing happens in your browser. Your data is never sent to a server.
- Unicode support: Correctly encodes multi-byte UTF-8 characters, including Chinese, Japanese, Arabic, and emoji characters.
- Batch encoding: Encode multiple strings or an entire URL at once without restrictions.
- Instant results: The encoder produces results in milliseconds, regardless of input length.
- Free and unlimited: Use the tool as many times as you want with no usage caps or hidden costs.
- Mobile-friendly: The responsive design works on any device, from desktop monitors to phone screens.
Common Use Cases for URL Encoding
Query parameter construction:When building URLs with query strings, the parameter values must be encoded. For example, a search for "café & restaurant" must be encoded as "caf%C3%A9%20%26%20restaurant" to be included safely in a URL.
Form submissions:HTML forms with the "application/x-www-form-urlencoded" content type automatically encode field values. Understanding URL encoding helps you debug form submissions and build custom form handlers.
API development: REST APIs often accept parameters in the URL. Proper encoding ensures that special characters in request parameters do not break the API call or cause the server to misinterpret the data.
Web scraping: When constructing URLs for web scraping, you need to encode search terms and filter values to match the format expected by the target website.
Email links:The "mailto:" URL scheme uses URL encoding for the subject and body parameters. Encoding ensures that line breaks and special characters in the email content are preserved correctly.
URL Encoding vs. Base64 Encoding
URL encoding and Base64 encoding serve different purposes. URL encoding is designed specifically for URLs—it replaces only the characters that are unsafe in URL context while keeping the output human-readable where possible. Base64 encoding converts all data into a fixed set of 64 characters and is used for embedding binary data in text formats like JSON or HTML.
Use URL encoding when you need to include text in a URL. Use Base64 when you need to embed binary data in a text-based format. They are not interchangeable, and using the wrong one can lead to broken URLs or corrupted data.