URL Encoder / Decoder in Pakistan
Percent-encode URLs for safe sharing, or decode them back — encode, decode, and component modes.
Output
🔒 Runs in your browser. Nothing uploaded.
How to use
- 1
Paste your URL or text into the box.
- 2
Pick a mode: Encode URL for a whole link, Encode component for a single value, or a Decode mode to reverse it.
- 3
Copy the encoded or decoded result.
Formula / How it works
URL encoding replaces unsafe characters with a % followed by two hex digits — a space becomes %20, for example.
encodeURIComponent encodes everything except letters, digits and - _ . ! ~ * ' ( ), so it is right for a single query value.
encodeURI leaves the URL structure alone (: / ? & = stay as they are), so it is right for a whole URL.
Decoding reverses the process. A malformed sequence like a lone % sign produces a clear error message instead of a crash.
Frequently asked questions
What is the difference between encodeURI and encodeURIComponent?
encodeURI is for a whole URL — it leaves : / ? & = untouched so the link still works. encodeURIComponent is for one value inside a URL (like a search term) and encodes those characters too, so the value cannot break the link.
Why do spaces become %20?
Spaces are not allowed in URLs. Percent-encoding replaces a space with %20 (its hex code), so the URL stays valid when shared or pasted into a browser.
Does it handle Urdu text in URLs?
Yes. Non-English characters are first converted to UTF-8 bytes and each byte is percent-encoded, which is exactly how browsers handle them.
What does the malformed sequence error mean?
When decoding, a % must be followed by two hex digits (like %20). A lone % or something like %ZZ is invalid, so the tool reports it instead of guessing.
When would I need to encode a URL?
When a link contains spaces, Urdu text, or special characters — for example in a WhatsApp message, an email, or a query parameter value. Encoding keeps the link clickable and unbroken.
Related tools
Secure Password Generator
Generate strong random passwords with crypto-grade randomness — they are never sent anywhere.
JSON Formatter & Validator
Format, beautify and validate JSON in your browser — with clear error messages showing the exact line and position.
Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 back to text — with full Unicode support, in your browser.
UTM Link Builder
Add UTM tracking parameters to any link — build campaign URLs for Facebook, Google and email in seconds.
Was this URL Encoder / Decoder helpful?
Last updated: 15 November 2026 | Reviewed by: Marwat