URL Encode & Decode

Paste a query value, path segment or full link and get the percent-encoded version as you type. Decode encoded URLs from logs and redirects back into readable text with one click.

Loading URL Encode & Decode…

How to Use URL Encode & Decode

1

Paste the text or URL

Enter a query value, a path segment, or a full URL copied from a log or redirect.

2

Encode or decode

Press Encode URL to percent-encode every reserved character, or Decode URL to turn %XX sequences back into readable text. Ctrl+Enter runs the main action.

3

Check the result

Look for characters that changed meaning: & and = inside a value should become %26 and %3D, and a space should become %20.

4

Copy it into your link or code

Copy the output and place it into the query string, redirect parameter or API request you are building.

URL Encode & Decode Guide

What URL encoding does

URLs may only contain a limited set of characters. Everything else, including spaces, &, =, ?, #, and any non-ASCII letter, has to be written as a percent sign followed by the byte's two-digit hex code. A space becomes %20, an ampersand becomes %26, and "é" becomes %C3%A9 (its two UTF-8 bytes).

Getting this wrong causes subtle bugs: an unencoded & in a query value splits it into two parameters, an unencoded # cuts the rest of the URL off as a fragment, and a + is read as a space by many servers.

Encoding a component vs a whole URL

This tool uses component encoding, the same as JavaScript's encodeURIComponent(). It escapes every reserved character, which is what you want for a single query value, path segment or redirect target. If you encode a complete URL this way, its :// and / separators are escaped too, which is correct when the whole URL is itself a parameter, as in ?redirect=https%3A%2F%2Fexample.com.

Frequently Asked Questions

Should a space be encoded as %20 or +?

In paths and in modern APIs, use %20. The + form comes from HTML form submissions (application/x-www-form-urlencoded), where servers decode + as a space in the query string. Because + is ambiguous, encoding a literal plus sign as %2B avoids surprises.

Why is my URL encoded twice, with %2520 in it?

%25 is the encoded percent sign, so %2520 is an already-encoded %20 that was encoded again. This happens when a value passes through two layers that each encode it. Decode once to check, and make sure only one layer in your code is responsible for encoding.

What is the difference between encodeURI and encodeURIComponent?

encodeURI leaves characters such as :, /, ?, & and = alone so a complete URL keeps working. encodeURIComponent escapes them too, which is right for a single value. This tool matches encodeURIComponent, the safer choice for building query strings.

How are non-English characters encoded?

They are first converted to UTF-8 bytes, and each byte is written as %XX. That is why one character such as "ü" turns into two sequences, %C3%BC, and many emoji turn into four.

Which characters never need encoding?

The unreserved characters are always safe: the letters A to Z and a to z, the digits 0 to 9, and the four symbols hyphen, period, underscore and tilde. Every other character is either reserved for URL structure, such as / ? # & and =, or must be percent-encoded when it appears inside a value.

Is a URL with encoded characters bad for SEO?

No. Search engines decode URLs and treat %C3%A9 and é as the same address. For readability, many sites still prefer short lowercase slugs with hyphens, which avoid encoding altogether and are easier to share.

Related Guides

More in Developer Utilities