Skip to content

URL Encoder

Make any text safe for a URL: spaces, accents, ampersands and emoji become %XX sequences.

Processed locally in your browser

Options
0 chars · 0 lines
The result will appear here.

What is URL Encoder?

URLs may only contain a limited set of ASCII characters. Everything else, and reserved characters used as data, must be percent-encoded: each byte is written as "%" plus two hex digits, so a space is %20 and "é" (UTF-8 bytes c3 a9) is %C3%A9.

Three modes cover the usual cases. Component mode behaves like JavaScript’s encodeURIComponent and is right for a query value or path segment. Full URL mode behaves like encodeURI and keeps : / ? & = # intact so a whole address stays usable. Form mode follows application/x-www-form-urlencoded and writes spaces as "+". The tool only converts text; it never opens or fetches the URL.

How does it work?

  1. Paste the text or URL into the input box.
  2. Pick the mode: Component for a single value, Full URL for a complete address, Form for HTML form data.
  3. Optionally encode ! ' ( ) *, keep existing %XX escapes to avoid double encoding, or encode each line separately, then copy the result.

Common use cases

  • Putting a search phrase such as "café & bar" into a query-string parameter.
  • Preparing a redirect_uri or callback URL that is itself passed as a parameter.
  • Encoding non-Latin path segments before sharing a link.
  • Fixing an address that contains spaces so it works in curl, Postman or an email.

Examples

Try this input in the tool above:

Input
https://example.com/search?q=café & bar
Output
https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dcaf%C3%A9%20%26%20bar

Privacy

URL Encoder runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.

Limitations

Encoding the same text twice produces %25 sequences (double encoding). Use the "keep existing %XX" option in Full URL mode for partly encoded addresses.

Frequently asked questions

What is the difference between Component and Full URL mode?

Component encodes reserved characters like / ? & = # so the text can be a value inside a URL. Full URL leaves them as they are because they give the address its structure.

Why is a space %20 sometimes and + at other times?

%20 is the standard percent-encoding of a space. "+" means space only in HTML form data (query strings from forms), which is what Form mode produces.

Are emoji and accents handled?

Yes. Text is converted to UTF-8 first, so 😀 becomes %F0%9F%98%80. Text with an unpaired surrogate cannot be encoded and is reported as an error.

More tools in Encoding & Decoding →