URL Encoder & Decoder

Enter text and choose Encode or Decode.

How to use the URL Encoder & Decoder

Paste text into the input box, choose an encoding type and click Encode to make it safe for a URL, or Decode to turn percent-encoded text such as %20 back into readable characters. The result appears in the output box, ready to copy. All processing is local to your browser.

Which encoding type should I choose?

Example: encoding “coffee and tea” and an accented letter

The text coffee & tea encoded as a component becomes coffee%20%26%20tea. Decoding that string returns the original. A non-English character such as “é” becomes %C3%A9, which is its UTF-8 representation.

Where URL encoding comes up

Frequently asked questions

Why did decoding fail?
The input likely contains a stray percent sign or an incomplete sequence like %E2%82. Percent signs must be followed by two hexadecimal digits.

Are plus signs treated as spaces?
In component decoding, yes, because many forms encode spaces as +. Full URL decoding leaves plus signs unchanged.

Is this encryption?
No. URL encoding only makes characters safe for transport; anyone can decode it.

Percent-encoding reference

These are the characters that most often need encoding when they appear inside a single URL value, such as a search term or a redirect address passed as a parameter. Component mode encodes all of them; Full URL mode leaves the separators (/ ? # & =) alone because they give the address its structure.

CharacterEncodedWhy it matters
space%20Spaces are not allowed in URLs
&%26Separates query parameters
=%3DSeparates a parameter name from its value
?%3FStarts the query string
#%23Starts the fragment; everything after it is not sent to the server
/%2FSeparates path segments
+%2BOften read as a space in form data
%%25Starts every encoded sequence

Worked example: building a search link

Suppose you want a link that searches a shop for shoes & socks, size 9/10. If you paste that text straight into https://shop.example.com/search?q=, the & ends the parameter early and the server only sees “shoes “. Encode just the value in Component mode first:

shoes%20%26%20socks%2C%20size%209%2F10

Then add it after q=. The rule of thumb: encode each value separately in Component mode, then join the pieces with the normal ?, & and = characters.

Spotting double encoding

If you see %2520 in a link, the text was encoded twice: the % of %20 was itself turned into %25. Paste it into the tool and press Decode; if the result still contains %20, use “Use output as input” and decode once more. Then find the step in your code or spreadsheet that encodes a value that was already encoded.

Read the full explanation, including the difference between encodeURI and encodeURIComponent, in URL encoding explained: what %20 means and when to encode.

Limitations

The tool follows JavaScript’s standard encoding functions, which may differ slightly from other languages or older standards. See our Disclaimer and Privacy Policy. Browse the full tools directory. Related tools: JSON Formatter & Validator, Text Case Converter.

Learn more: read our Developer Guides, articles on JSON, REST APIs and URL encoding.