URL Encoder
URL-encode any text instantly online. Free percent-encoding tool using encodeURIComponent. Supports Unicode, emoji, and special characters.
Related Tools
Base64 Encode
Encode any text to Base64 instantly. Full UTF-8 support, runs entirely in your browser.
Base64 Decode
Decode Base64 strings back to plain text instantly. Full UTF-8 support, runs entirely in your browser.
URL Decode
Decode URL-encoded percent sequences back to plain text instantly. Supports all encoded characters.
URL encoding (also called percent-encoding) is defined in RFC 3986 and converts characters that are not permitted in URL components into a % followed by their two-digit hexadecimal UTF-8 byte values. The specification distinguishes reserved characters (which delimit URL structure) from unreserved characters (which need no encoding). This encoding predates the web itself.
Every web developer encounters URL encoding when building query strings, embedding search terms in links, constructing API requests, crafting OAuth 1.0a signatures, or passing redirect URLs as parameters. Failure to encode correctly causes truncated query parameters, broken redirects, and security vulnerabilities like open redirect bypasses.
This tool encodes text using JavaScript's encodeURIComponent() function, which encodes all characters except unreserved ones (A–Z, a–z, 0–9, -, _, ., ~). This is the correct function for encoding individual query parameter names and values — distinct from encodeURI(), which preserves structural URL characters and is not appropriate for parameter values.
Common Use Cases
Building search query parameters
Search engines and e-commerce platforms (Google, Amazon, Elasticsearch) pass search terms as query string values. A search for 'C++ templates & generics' must be encoded before being appended to a URL. Without encoding, the + and & characters break the query string parser on the receiving server.
Encoding redirect URLs as parameters
OAuth flows and SSO systems (Auth0, Okta, SAML) pass post-login redirect destinations as a URL-encoded parameter inside another URL: /login?returnTo=https%3A%2F%2Fapp.example.com%2Fdashboard. The inner URL must be percent-encoded so its slashes and colons are not misinterpreted as parts of the outer URL's structure.
Constructing OAuth 1.0a signatures
OAuth 1.0a (used by Twitter API v1.1, Flickr, and older Atlassian APIs) requires all request parameters to be percent-encoded, then sorted, then concatenated into a signature base string. A single incorrectly encoded character produces an invalid HMAC-SHA1 signature and a 401 response.
Embedding file paths in URLs
REST APIs for cloud storage services (AWS S3, Google Cloud Storage, Azure Blob Storage) embed object keys — which may contain spaces, Unicode characters, or slashes — in URL paths or query strings. Encoding the key with percent-encoding ensures the HTTP request routes to the correct object regardless of special characters in the filename.
How to Use the URL Encoder
- Paste or type your text in the left panel.
- The URL-encoded output appears instantly in the right panel.
- Click "Copy Output" to copy the result to your clipboard.
- Use "Load Example" to see a sample encoding.
What is URL Encoding?
- Converts special characters into percent-encoded sequences (e.g., space → %20).
- Required for safely passing data in query strings and form submissions.
- Uses
encodeURIComponent— encodes all characters except letters, digits, and- _ . ! ~ * ' ( ). - Supports Unicode characters, including emoji and non-Latin scripts.