Loona Automation logoLoona Developer Tools
Home › Encoders & Decoders

URL Encoder (Percent Encoding)

In short: turn text into its percent-encoded form for safe use inside URLs — spaces, &, =, ? and non-ASCII characters become %XX codes. Choose component mode for a single value, or full-URL mode to encode a complete link while keeping its structure.
🔒 Private by design: everything runs in your browser on this device. Your input is never uploaded to a server.

Example

Input:

name=Ali Raza&city=Faisalabad

Output:

name%3DAli%20Raza%26city%3DFaisalabad

About this converter

Percent-encoding (RFC 3986) replaces every byte that is not allowed in a URL with % followed by two hex digits of its UTF-8 value: a space is %20, an ampersand is %26, and the Urdu letter ب is %D8%A8. The two modes matter: encoding a component (a query value, a path segment) must escape everything structural, because a raw & or = inside a value would break the URL apart; encoding a full URL must preserve the structure and only escape characters that are invalid anywhere. A common bug is double-encoding — encoding an already-encoded string turns %20 into %2520. Note that in query strings, + is also used for a space (from HTML form encoding), which decoders on this site handle.

Frequently Asked Questions

Should I encode a space as %20 or +?

In a path, only %20 is correct. In a query string both are understood, with + coming from HTML form submission (application/x-www-form-urlencoded).

What characters never need encoding?

Letters, digits and - _ . ~ are unreserved and always safe. Everything else depends on where in the URL it appears.

Why did my URL break after encoding?

Usually double-encoding, or encoding the whole URL in component mode so its : / ? became %3A %2F %3F. Use full-URL mode for complete links.

Related Developer Tools

Embed this tool on your website — free

Add this tool to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the tool to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.