All tools

URL Encoder / Decoder

Percent-encode URLs or decode encoded strings — live, in-browser.

What is URL encoding?

URLs can only contain certain safe ASCII characters. Spaces, non-ASCII letters, and special characters like &, =, ?, and # must be replaced with a percent sign followed by their two-digit hex code. For example, a space becomes %20 and & becomes %26. This process is called percent-encoding. Without it, a URL containing a space or special character would be misinterpreted or rejected by web servers.

encodeURIComponent vs encodeURI

This tool uses encodeURIComponent, which encodes everything except letters, digits, and - _ . ! ~ * ' ( ). This is the correct function to use when encoding a URL parameter or query string value. encodeURI leaves characters like / ? # & = unencoded, making it suitable for encoding a complete URL rather than a component.

Frequently asked questions

When do I need to encode a URL?

Anytime you're constructing a URL programmatically and inserting user-provided values into query parameters or path segments. For example, a search query containing spaces or special characters must be encoded before being appended to a URL.

Why does %20 sometimes appear as +?

In HTML form submissions using application/x-www-form-urlencoded encoding, spaces are represented as + rather than %20. Both are valid representations in different contexts. This tool uses the standard %20 encoding.

Can I decode a full URL at once?

Yes, paste any percent-encoded URL or string into the decode mode and the tool will convert all %XX sequences back to their original characters, including Unicode characters.

Page share preview

More free image tools