URL Encode / Decode

URL-encode special characters as percent-escapes (%20 etc.) or decode them back. Auto-detects direction. Useful for query parameters, redirects, and reading messy URLs.

Example: hello world?hello%20world%3F

URL encoding (percent-encoding) replaces characters that have special meaning in URLs with % followed by their hex byte value. ? becomes %3F, space becomes %20, and so on. This is required when including arbitrary text in URL query parameters or path segments.

The tool auto-detects: if the input contains %xx sequences, it decodes; otherwise it encodes.

Use cases

Building search query URLs

Encode user input before pasting into a URL: "hello world" → "hello%20world". Required for any query string with spaces or punctuation.

Reading messy URLs from logs

URLs in server logs are percent-encoded. Decoding makes them readable — you can see what the user actually searched for.

Debugging redirect URLs

OAuth and SAML flows pass redirect URLs as encoded query params. Decoding shows the actual destination.

Sharing URLs with special characters

If you want to share a URL with parentheses or non-ASCII characters and need it to survive copy-paste, encode it first.

Building Mailto / SMS links

mailto: and sms: URLs need encoded subject lines and bodies. Encode the message text before assembling.

Frequently asked questions

encodeURI vs encodeURIComponent — which does this use?

encodeURIComponent — encodes everything that's special, including ?, =, &, /. Use it when encoding a single value to put inside a URL. Use the broader encodeURI when encoding a whole URL.

Why are spaces sometimes encoded as + instead of %20?

In query strings (the part after ?), the legacy form-encoding standard uses + for space. Both are valid in query strings; %20 is universal everywhere else.

Does it encode UTF-8?

Yes — non-ASCII characters are encoded as their UTF-8 bytes (e.g. é → %C3%A9). This is the modern standard.

Will it double-encode an already-encoded string?

If your input contains %xx patterns, the tool assumes it's already encoded and decodes. To force re-encoding, paste cleaner input or run twice manually.

Embed our tools on your website

Free for any site. No signup. Iframe loads from our servers and stays up-to-date automatically.

📋 Embed the Word Counter

Copy this snippet:

Live preview:

📋 Embed this URL Encode / Decode

Copy this snippet:

Live preview:

Want more options? All embeddable tools →