URL Encoder / Decoder
Safely percent-encode URLs, query parameters, and path segments — or decode encoded strings back to plain text.
encodeURIComponent
Encodes all characters except: A–Z a–z 0–9 - _ . ! ~ * ' ( ). Best for encoding query parameter values.
encodeURI
Preserves URL structure characters like : / ? # [ ] @ ! $ & ' ( ) * + , ; =. Best for full URL encoding.
How to Use the URL Encoder
Paste URL or Text
Enter the URL or text string you want to encode in the input field.
Choose Encoding Mode
Select encodeURIComponent for query params, or encodeURI for complete URL encoding. Switch between Encode and Decode mode.
Copy Result
Click Copy to get the encoded/decoded result, or click Swap to reverse the operation.
Frequently Asked Questions
What is URL encoding?
URL encoding (percent encoding) replaces unsafe characters with a % followed by two hexadecimal digits. For example, a space becomes %20, and & becomes %26.
When should I use encodeURIComponent vs encodeURI?
Use encodeURIComponent() for individual query parameter values (it encodes characters like : / ? # & = too). Use encodeURI() for a complete URL where you want to preserve the URL structure.
Can I decode multiple parameters at once?
Yes. Paste the entire query string and the tool will decode all percent-encoded characters at once.