URL Encoder / Decoder

Percent-encode text and URLs containing spaces or special characters, or decode a garbled %XX URL back to readable text. Paste a URL to see its path and query parameters in a table.

URL parser

iPhone app · Free to downloadGIF Keyboard & Search - GIFFFFind, save and share GIFs in seconds.View on the App Store

About the URL Encoder / Decoder

URLs may only contain letters, digits and a few symbols, so spaces and characters such as é or ü must be percent-encoded (for example é → %C3%A9). That is why a link that looks readable in the address bar turns into a long string of %C3… codes when you copy it.

This tool supports both JavaScript methods, encodeURIComponent and encodeURI, and if a % sequence is malformed it tells you exactly which character is the problem.

How to use

  1. Choose Encode or Decode.
  2. Pick Value (Component) for a single search term or parameter value, or Full URL (URI) for a complete address.
  3. The result updates as you type. Click ⇅ Use output as input to convert it back the other way.
  4. Paste an address into the URL parser below to see its protocol, host, path and query parameters separately.

Worked examples

Encode a value for a query string

Input
Tom & Jerry's 50% off (Encode, Component)
Result
Tom%20%26%20Jerry's%2050%25%20off
With "spaces as +" on: Tom+%26+Jerry's+50%25+off

The & becomes %26 and the % becomes %25, so the server reads the whole phrase as one value. The apostrophe stays as it is because encodeURIComponent leaves ' ( ) * ! ~ unescaped.

Why encodeURI is wrong for a single value

Input
https://example.com/search?q=café & bar&page=2 (Encode, URI)
Result
https://example.com/search?q=caf%C3%A9%20&%20bar&page=2

encodeURI keeps the & inside "café & bar", so the server now sees a broken parameter named " bar". Encode the value with Component first, then put it into the URL.

A legacy Latin-1 link that will not decode

Input
caf%E9 (Decode)
Result
Character 4 "%E9": These bytes are not valid UTF-8 (the URL may use a legacy encoding such as Windows-1252/Latin-1)

Old sites encoded é as the single byte %E9. In UTF-8, the modern standard, the same letter is %C3%A9, so caf%C3%A9 decodes to café.

encodeURIComponent vs encodeURI

CharactersencodeURIComponentencodeURI
Spaces, non-ASCII (é, ü, 日)encodedencoded
: / ? # & = + , ; @ $encodedkept
A-Z a-z 0-9 - _ . ! ~ * ' ( )keptkept

If a query value contains & or =, encodeURI will split the parameters incorrectly. Always use the Component method for values.

Is a space %20 or +?

In the URL standard (RFC 3986) a space is %20. HTML form submissions (application/x-www-form-urlencoded), however, write spaces as +, which is why a Google search URL looks like q=coffee+shop. Turn on + as spaces when decoding such URLs.

FAQ

Decoding says the bytes are not valid UTF-8.

Some older sites encode characters in Windows-1252 or ISO-8859-1, where é is a single byte (%E9). Modern browsers and this tool use UTF-8 (where é is %C3%A9), so such legacy URLs can’t be decoded as text.

What happens if a URL is encoded twice?

Every % becomes %25, giving strings like %25C3%25A9. If you see lots of %25 in a result, it was double-encoded. Decode it twice.

Are international domain names percent-encoded?

No. Domains use Punycode instead (starting with xn--). For example münchen.de becomes xn--mnchen-3ya.de, which the URL parser shows as the host.

What is the URL parser for?

It is handy for checking tracking links. Paste https://shop.example.com/products?utm_source=newsletter&utm_medium=email&q=running%20shoes&page=2#reviews and you get the host, path and fragment plus a table of 4 query parameters, with q shown decoded as "running shoes" and a copy button for each value.

How do I clean up a value like %2520?

%25 is an encoded percent sign, which means the value was encoded twice. Decoding caf%C3%A9%2520menu once gives café%20menu; press swap and decode again to get café menu. Repeat until no % sequences remain.