Z

How to URL Encode a String (Step by Step)

URL-encode (percent-encode) text so it is safe in a URL or query string — step by step, with a free URL encoder.

Putting arbitrary text in a URL means escaping unsafe characters first:

  1. 1

    Open the encoder

    Open the URL encoder and choose encode.

  2. 2

    Paste your text

    Paste the text or value you want to put into a URL or query string.

  3. 3

    Copy the encoded result

    Unsafe characters become %XX escapes (e.g. a space becomes %20). Copy it into your URL.

Do it now

Frequently asked questions

When do I need to URL-encode?

Whenever a value placed in a URL or query string contains spaces, &, ?, / or non-ASCII characters — otherwise they break the URL structure.