Skip to content
NMSnabbit.

URL Encode Online

Percent-encode text for safe use in a URL (encodeURIComponent).

Encoders & Decoders Runs in your browser

How do you URL encode text online?

URL encoding, defined in RFC 3986, replaces reserved and non-ASCII characters with percent escapes. This tool applies encodeURIComponent, the strict variant meant for individual values: a space becomes %20, an ampersand %26, and a UTF-8 multibyte character one escape per byte, so é arrives as %C3%A9. Letters, digits and a few unreserved marks pass through untouched.

How to use the URL Encode

  1. 1 Enter the raw value destined for a query parameter.
  2. 2 Reserved characters are swapped for %xx escapes per RFC 3986.
  3. 3 Encode values one at a time rather than a full URL, or the structural / and ? get escaped too.
  4. 4 Copy the escaped value into your link.

What you can use it for

  • Building a safe query string parameter.
  • Encoding a search term before adding it to a link.
  • Escaping a redirect or callback URL value.
  • Preparing user input for an API request URL.

Frequently asked questions

Which characters get encoded?
Everything except A–Z, a–z, 0–9 and the handful of marks encodeURIComponent leaves alone. Spaces, &, =, ?, /, # and all non-ASCII characters come out as one or more %xx escapes.
Should I encode the whole URL or just a value?
Just the value. Running a complete URL through component encoding escapes the :// after the scheme and every path slash, producing a link that no longer resolves. Build the URL first, then encode each parameter.
How do spaces appear?
As %20, which is valid in every part of a URL. The + convention belongs to application/x-www-form-urlencoded bodies; treat %20 as the safe default.

Related tools

More Encoders & Decoders

More tools like this:

All Encoders & Decoders