Skip to content
KitWren
Website

URL Encoder

Percent-encode text for URLs and query strings — or switch to decoding.

  1. Paste your input
  2. Choose the options
  3. Copy the output
Runs in your browser. Your data and files never leave your device.

About the URL Encoder

Encode special characters (spaces, &, ?, non-English letters) so text can be safely used in a URL. Choose whether you’re encoding a single value or a whole URL.

How does the URL Encoder work?

URLs can only contain a limited set of characters. Everything else — spaces, &, ?, #, non-English letters — is written as a % followed by two hex digits for each UTF-8 byte. Encoding a single value (a query parameter) escapes reserved characters like & and =; encoding a whole URL leaves the characters that give it structure alone.

Example

café & bar as a query value becomes caf%C3%A9%20%26%20bar — é is two UTF-8 bytes (%C3%A9), the space is %20 and & is %26.

Frequently asked questions

What’s the difference between encodeURI and encodeURIComponent?

encodeURIComponent encodes everything that isn’t safe inside a query value, including / ? & =. encodeURI leaves characters that structure a URL alone.

Should a space be %20 or +?

Both mean a space in query strings from HTML forms. In the path part of a URL, only %20 is correct.

Why was my URL double-encoded?

It was encoded twice — %20 became %2520. Decode once to get back to the original.