URL Encoder — Encode or Decode with One Toggle

URL encode any string, or flip to decode — converts spaces, special characters, and Unicode into percent-encoded URI format instantly. Free, client-side.

🔒 100% Client-Side Processing

Your data is processed entirely in your browser and never transmitted to any server.

Example

Input

hello world & more

Output

hello%20world%20%26%20more

Space becomes %20, & becomes %26 — encodeURIComponent escapes every character a URL can't carry literally.

Convert to:
0 / 100M Limit

Common Use Cases

Building query strings safely

Encode user input, search terms with spaces, or values containing & and = before appending them to a URL so the parameters parse correctly.

Preparing callback and redirect URLs

OAuth flows and payment gateways require nested URLs passed as parameters — encode the inner URL so it survives as a single value.

Encoding non-Latin text

Convert Unicode search terms or path segments into the percent-encoded form APIs and servers expect.

Frequently Asked Questions

What is percent-encoding?
Percent-encoding (also called URL encoding) represents unsafe or reserved characters — spaces, &, =, non-ASCII letters — as a % followed by two hex digits, so the result contains only characters a URL is guaranteed to carry safely. Space becomes %20, & becomes %26, and so on.
What is the difference between encodeURI and encodeURIComponent?
encodeURI keeps structural URL characters like /, ?, and & intact for encoding whole URLs. encodeURIComponent (what this tool uses) encodes everything, which is correct when encoding a single query-parameter value.
How is a space encoded in a URL?
As %20 in paths and modern query strings, or as + in legacy form encoding. This tool produces %20, which is always safe. Other common escapes: & becomes %26, = becomes %3D, and # becomes %23.
Is URL encoding the same as encryption?
No. Percent-encoding is a reversible, publicly-known text transformation with no secret key — anyone can decode it instantly, including in a browser address bar. It exists to make special characters URL-safe, not to hide or protect data.
How do I URL encode in JavaScript, Python, or PHP?
JavaScript: encodeURIComponent(str). Python: urllib.parse.quote(str). PHP: rawurlencode($str). All three percent-encode the same way this tool does — paste a value here first to confirm the expected output.
I need to decode a URL, not encode one — where do I do that?
Use the "Convert to" toggle above the input box to switch to Decode without leaving this page — or visit the dedicated URL Decoder if you prefer.
Is my data private when I use this tool?
Yes. This tool runs entirely in your browser using client-side JavaScript — nothing you type is transmitted to, logged by, or stored on any server. You can safely process confidential text, tokens, or code.