URL Decoder and Encoder for Safe Links
Encode text for safe use in URLs, or decode percent-encoded URLs back to plain text.
About URL Encoder / Decoder
URL Encoder / Decoder converts text to and from percent-encoding, the notation that lets spaces, ampersands and non-English letters travel safely inside a web address. In Encode mode each unsafe character becomes a % followed by two hexadecimal digits; in Decode mode those sequences turn back into readable text. Results update as you type, and Swap sends the output back through the opposite mode.
You need it when building a query string by hand, when a link containing Urdu text or an ampersand in a name breaks, when a long tracking or redirect address is full of %3A and %2F and you want to read it, or when a callback URL has to be passed as a parameter inside another URL, as many payment and sign-in integrations require.
The tool relies on the browser's encodeURIComponent and decodeURIComponent functions, so it treats your input as a single value rather than a complete address. Characters such as : / ? and = are therefore encoded too. A plus sign is not turned into a space when decoding, and malformed input such as a lone % is reported as invalid.
How to use URL Encoder / Decoder
- Select Encode to make text safe for use inside a URL, or Decode to read an encoded string.
- Paste or type in the left box; the right box updates with every keystroke.
- When encoding a query parameter, paste only the value (a name, a search phrase, a return address), not the whole link.
- Check the right box. If it is empty and "Invalid input for this mode." appears, the text contains a broken % sequence or a character that cannot be converted.
- Click Swap to feed the result back in as input in the opposite mode and confirm the round trip, then click Copy output.
Tips for best results
- Encode each parameter value on its own, then join the pieces with ? & and = yourself. Encoding a full address such as https://example.com/a?b=1 also encodes the colon, slashes and equals sign, and the link stops working.
- Spaces become %20, never +. Servers accept %20 in paths and query strings; if a form-style system specifically wants +, replace %20 by hand.
- Encoding twice is a common mistake. Run an already-encoded string through Encode and the % itself is encoded, so %20 becomes %2520. If a result looks doubled, decode it once and compare.
- Decoding turns %2F back into / and %26 back into &, so decoded text is meant for reading, not for pasting back into a live URL.
- Copy output gives no confirmation message on this page, so paste the text somewhere to check that it was copied.
Frequently asked questions
What's the difference between this and Base64?
URL encoding (percent-encoding) is designed specifically for safely including text inside a URL, replacing unsafe characters with %XX sequences.
Does it encode the whole URL or just a component?
It encodes a single value using encodeURIComponent, which is correct for query parameters and path segments.
Why does decoding say "Invalid input for this mode"?
A % that is not followed by two hexadecimal digits, or a sequence that does not form valid UTF-8 text, makes decoding fail. Fix or remove the broken sequence, and check that Decode is the selected mode.
Why are + signs not turned into spaces when I decode?
In the path of a URL a + is simply a plus. Only form-encoded query strings use + for a space, and this tool does standard percent-decoding only, so replace + with a space yourself if that is what it meant.
Which characters are left unchanged when encoding?
Letters A-Z and a-z, digits 0-9 and the symbols - _ . ! ~ * ' ( ) stay as they are. Everything else, including spaces and # & ? / : @ = + , is converted.
Why does my Urdu or Arabic text turn into %D8%... codes?
Non-English letters are first converted to UTF-8 bytes and each byte is written as %XX, so one letter becomes two or more groups. Decoding the codes returns the original letters exactly.