JustConvertAll-in-One Convert

URL Encoder

URL-encode any text instantly online. Free percent-encoding tool using encodeURIComponent. Supports Unicode, emoji, and special characters.

Related Tools

Advertisement

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

  1. Paste or type your text in the left panel.
  2. The URL-encoded output appears instantly in the right panel.
  3. Click "Copy Output" to copy the result to your clipboard.
  4. Use "Load Example" to see a sample encoding.

What is URL Encoding?