Главная URL Encoder

URL Encoder

Percent-encode any text into a safe URL string — 100% in your browser, no upload.

Input

Output

What is URL encoding?

URL encoding, also known as percent-encoding, is the standardised way of representing characters that are not allowed or not safe inside a URL. Because URLs may only contain a limited subset of ASCII characters — letters, digits and a few reserved symbols such as -, _, ., ~ — any other character must be encoded as a percent sign followed by two hexadecimal digits that represent the byte value. A space, for example, becomes %20, an ampersand becomes %26, and the Chinese character 你 becomes %E4%BD%A0 in UTF-8.

URL encoding was first formalised in RFC 1738 in 1994 and is currently specified in RFC 3986. It is what allows browsers, web servers, and HTTP clients to exchange data containing Unicode characters, spaces, punctuation and reserved symbols without ambiguity. Every modern programming language ships with a built-in URL encoder, and the JavaScript function used by this tool is encodeURIComponent().

When to URL-encode text

URL encoding is needed whenever you place text data inside a URL — most commonly in query strings, path segments, fragment identifiers, form payloads, or HTTP headers. Common scenarios include:

  • Query parameters. When appending ?name=John Doe&city=New York to a URL, the spaces and special characters must be percent-encoded to ?name=John%20Doe&city=New%20York.
  • API requests. REST and GraphQL APIs expect encoded values in their URLs; an unencoded / in a parameter could be misinterpreted as a path separator.
  • Email and messaging links. Mailto links, share URLs and deep links must encode subject, body and parameter values.
  • Non-ASCII text. Chinese, Japanese, Korean, Arabic and emoji characters must be percent-encoded in UTF-8 to be safely included in a URL.
  • OAuth and SSO callbacks. State tokens, redirect URIs and code challenges are transmitted as encoded query parameters.
  • Analytics tracking. UTM parameters containing spaces, ampersands or accented letters must be encoded to survive transport.

Forgetting to encode a value can break a URL, leak partial data to the wrong parameter, or trigger 400 Bad Request responses from strict servers.

encodeURIComponent vs encodeURI

JavaScript provides two related encoding functions, and choosing the wrong one is a common source of bugs. encodeURIComponent() is intended for individual parameter values and encodes every reserved character except A–Z, a–z, 0–9, and - _ . ~. encodeURI() is intended for whole URLs and leaves the structural separators : / ? # [ ] @ ! $ & ' ( ) * + , ; = untouched so the URL keeps working.

As a rule of thumb, use encodeURIComponent() for each value you drop into a query string, path segment or form field. Use encodeURI() only when you are encoding a complete, already-structured URL and want to keep its syntax intact. This tool uses encodeURIComponent() because the most common real-world task is encoding a single value rather than a full URL.

Common URL-encoded characters

Familiarising yourself with the most common encoded forms speeds up debugging of malformed URLs. The table below lists characters that are encoded most often in practice.

CharacterEncodedWhy
Space%20Spaces are not allowed inside URLs
&%26Separates query parameters
=%3DSeparates keys from values
?%3FMarks the start of the query string
#%23Marks the start of the fragment
/%2FPath separator
+%2BDecoded as space in form data
%%25Escape character itself

Note that in application/x-www-form-urlencoded payloads (HTML form submissions), a space is encoded as + rather than %20. Both forms are valid in URLs, but %20 is the canonical percent-encoding.

How to encode a URL

Encoding text with this tool takes only a second and happens entirely inside your browser. No upload, no sign-up, and no installation are required. The tool uses JavaScript's native encodeURIComponent() function. Follow these steps:

  1. Paste your text. Type or paste any string into the input box — ASCII, Unicode, symbols, even multi-line text.
  2. Click "Encode". The tool runs encodeURIComponent() on the input and writes the percent-encoded result into the output box in real time.
  3. Copy the result. Click "Copy to Clipboard" to copy the encoded string, then paste it into your URL, API request or code.
  4. Decode if needed. To reverse the operation, use the companion URL Decoder tool.

Because every step runs locally in your browser using JavaScript, your text is never uploaded to a server. This makes the encoding completely private, fast, and suitable for sensitive content such as tokens, keys and personal data.

Is this URL encoder free?

Yes, completely free with no sign-up, no watermarks and no limits.

Which characters does it encode?

It encodes everything except A–Z a–z 0–9 - _ . ~ using encodeURIComponent().

Does it support Unicode?

Yes. Non-ASCII characters are encoded as their UTF-8 byte sequences, each prefixed with %.

What's the difference between %20 and +?

Both represent a space. %20 is canonical percent-encoding; + is used in form submissions (application/x-www-form-urlencoded).

Are my inputs uploaded?

No. All processing is local. Your text never leaves your browser.