URL Encoder

Percent-encode text so it’s safe to put in a URL — a single query value, a whole address, or form data — with a warning when something is already encoded.

Encoded locally in your browser — URLs and values are never sent anywhere

What are you encoding?
Decode a URL →

How it works

Each character that isn’t allowed (or has a special meaning) in a URL is converted to its UTF-8 bytes. Each byte is written as % plus two hex digits: a space becomes %20, “é” becomes %C3%A9.

  • Query value or path segment uses encodeURIComponent: everything except A–Z a–z 0–9 - _ . ! ~ * ' ( ) is encoded.
  • Whole URL uses encodeURI, which keeps : / ? # & = + and other structural characters.
  • Form data is like a query value, but spaces become +, as HTML forms send them.

If the input already contains sequences like %20, you’ll see a warning, because encoding again would turn % into %25.

Example

As a query value, café & braai specials / 50% off becomes caf%C3%A9%20%26%20braai%20specials%20%2F%2050%25%20off. That’s safe in https://shop.example/search?q=….

As a whole URL, https://shop.example/a b?q=é becomes https://shop.example/a%20b?q=%C3%A9, with the structure intact.

Frequently asked questions

Which mode should I use?

“Query value or path segment” (encodeURIComponent) for a single piece you’re inserting into a URL — it encodes & = ? / # too, so they can’t break the URL’s structure. “Whole URL” (encodeURI) to clean up a complete address while keeping its structure. “Form data” for application/x-www-form-urlencoded bodies, where spaces become +.

Why did my %20 become %2520?

That’s double encoding: the % of an already-encoded sequence was encoded again as %25. The encoder warns you when your input already contains %XX sequences. Decode it first with the URL decoder if that’s not what you want.

Which characters are left alone?

Letters, digits and - _ . ! ~ * ' ( ) are never encoded. In whole-URL mode, the reserved characters ; , / ? : @ & = + $ # are also kept so the URL still works.

Is my input sent anywhere?

No. Encoding uses your browser’s built-in functions. URLs often contain tokens, emails and IDs, so nothing you type leaves your device.

Related tools

Decode percent-encoded text, unwrap double encoding and see every query parameter of a URL in a table.

FreeRuns in your browser

Build campaign-tracking URLs with UTM parameters so you can see which links bring visitors.

FreeRuns in your browser

Encode text (UTF-8) or any file to Base64, URL-safe Base64 or a data URI, with optional MIME wrapping.

FreeRuns in your browser

Generate random v4 or time-ordered v7 UUIDs in bulk, in the format you need.

FreeRuns in your browser

Related guides