MinifyPic

URL Encoder

Percent-encode text so it survives being put in a URL, and decode the %20-riddled results back into something readable.

FreeBoth directionsInstant
Loading tool…

How it works

A compact workflow from input to download.

1

Paste your text or URL

Enter the text you need to make URL-safe, or the encoded URL you want to read.

2

Encode or decode

Switch direction depending on which way you are going.

3

Copy the result

Copy the encoded or decoded output.

Frequently asked questions

Why does a space become %20?
Because URLs cannot contain literal spaces — a space would terminate the URL in many contexts. Percent-encoding replaces any unsafe character with a percent sign followed by its hexadecimal byte value, and a space is byte 32, which is 20 in hexadecimal. The same mechanism turns any character that would otherwise confuse a URL parser into a safe three-character sequence.
What is the difference between %20 and a plus sign?
Both can represent a space, in different contexts, and confusing them is a real source of bugs. In the path portion of a URL, a space is %20 and a literal plus is a plus. In a query string submitted by an HTML form, the historical convention encodes a space as a plus sign, and a genuine plus must therefore be encoded as %2B. Getting this wrong is why an email address with a plus in it so often arrives with the plus mysteriously replaced by a space.
Which characters need encoding?
Anything outside the unreserved set of letters, digits, hyphen, full stop, underscore and tilde. That includes spaces, ampersands, question marks, equals signs, hashes, slashes and every non-ASCII character — because each of those either has a structural meaning in a URL or cannot be transmitted safely.
Is my data sent to a server?
No. Everything runs in JavaScript inside your own browser tab — nothing is uploaded, logged or stored. That is what makes it safe to paste in API responses, config files, tokens and other material you could not send to a third-party service.

Why URLs need an escape hatch

A URL is not just a string; it is a structured expression in which certain characters carry meaning. The question mark starts the query string. The ampersand separates one parameter from the next. The equals sign divides a parameter's name from its value. The hash introduces a fragment. The slash separates path segments. Now suppose one of your values legitimately contains an ampersand — a search for 'Marks & Spencer', say. Written literally, the parser sees the ampersand and concludes that a new parameter has begun, and your search term is silently truncated to 'Marks '. Percent-encoding is the escape hatch: it lets you say 'this ampersand is data, not structure' by writing it as %26. Every character that means something to the URL grammar needs this treatment when it appears in a value.

Double encoding, the classic bug

The most common URL-encoding bug is encoding something twice. A space becomes %20 on the first pass. Run that result through an encoder again and the percent sign — which is itself a special character — gets encoded to %25, so %20 becomes %2520. The URL still looks plausible and is now wrong, and the far end receives the literal text '%20' rather than a space. This happens constantly when a value passes through several layers that each helpfully encode it: a framework encodes, then a template helper encodes again, then a redirect encodes a third time. If you see %2520 anywhere in a URL, you are looking at a double-encoded space, and the fix is to find the layer that is encoding something already encoded rather than to decode twice at the far end.