URL Encoder & Decoder

Encode or decode URLs and query strings instantly โ€” free, private, no signup.

Input

Output

What is URL encoding?

URL encoding (also called percent-encoding) converts special characters into a format that can be safely transmitted in URLs. Characters like spaces, ampersands, and non-ASCII characters are replaced with % followed by their hex value. For example, a space becomes %20.

When to use URL encoding

Use URL encoding when building query strings, passing user input in URLs, or working with APIs that require encoded parameters. Common characters that need encoding: & = ? # + / and spaces.

encodeURI vs encodeURIComponent

encodeURI() encodes a full URI but preserves characters like : / ? # & that are valid in URLs. encodeURIComponent() encodes everything except letters, digits, and - _ . ~ โ€” use it for individual query parameter values.