URL Decoder and Encoder for Safe Links

Encode text for safe use in URLs, or decode percent-encoded URLs back to plain text.

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.