URL encode

Percent-encode a string for safe use in URLs, query strings, and form bodies.

Runs in your browser Instant No signup, no tracking

About this tool

Percent-encode any string using `encodeURIComponent` semantics — the same encoding you need for query-string values, path segments containing special characters, and form bodies. Every character that isn't an unreserved URL character is replaced with its `%XX` UTF-8 byte representation. Everything runs in your browser.

Example

Paste the input on the left and you will get output like this:

Sample Text

search query: cats & dogs?

Resulting URL-encoded

search%20query%3A%20cats%20%26%20dogs%3F

How to use URL encode

  1. Paste or type your Text into the left pane.
  2. The URL-encoded appears instantly in the right pane. Conversion runs in your browser — nothing is uploaded.
  3. Copy the result to your clipboard or download it as a file.

FAQ

What's the difference from encodeURI?
`encodeURI` leaves reserved URL characters like `?`, `&`, `=`, and `/` alone. This tool encodes them, which is what you want for query-string *values* and path *segments*.
How are spaces encoded?
As `%20`. For `application/x-www-form-urlencoded` bodies, replace `%20` with `+`.
Does it handle Unicode?
Yes — multi-byte characters are UTF-8 encoded first, then percent-encoded byte by byte.