URL Encode

Make text safe to put in a URL.

Encoded

About this converter

A URL can only carry a limited set of characters. Everything else — spaces, accents, ampersands, anything non-English — has to be written as a percent sign and two hex digits.

The choice at the top is the one thing that matters here, and getting it wrong is the commonest bug in this area. Encoding a single value escapes the delimiters too, so a search term containing & or = or ? cannot break out and be read as the start of another parameter. Encoding a whole address deliberately leaves those characters alone, because otherwise you destroy the structure of the URL you were trying to make safe.

If you are building ?q=<something>, you want the first. If you have an address with a space in it, you want the second.

Frequently asked questions

Which option do I want?

If the text is going after an = in a query string — a search term, an email address, a redirect target — choose the single value. It escapes & = ? / # so they cannot be mistaken for URL structure. If you have a complete address that just contains spaces or accents, choose whole address, which leaves the structural characters intact.

Why is a space sometimes %20 and sometimes +?

Both appear. Percent-encoding proper uses %20. The + convention comes from HTML form submission, where spaces in application/x-www-form-urlencoded bodies are written as +. %20 is correct everywhere; + is correct only in that one context. This tool produces %20, and the decoder accepts both.

Do I need to encode a URL twice?

Only when one URL is a parameter inside another — a redirect target, typically. Then the inner one is a value, so it gets encoded, and the %s in it get encoded again as %25 when the outer URL is built. Double-encoding by accident is a common cause of links that almost work.

Does what I paste get sent anywhere?

No. The conversion runs in your browser, on your own machine, which is why the result appears as you type. What you paste is not uploaded or logged.

Related tools