PixConvert

Free URL Encoder & Decoder

Percent-encode text for a link, or decode %20-style strings back to text, with this free URL encoder and decoder. Use the default mode for query values and Full URI mode for whole links.

How to Encode or Decode a URL

1

Choose a mode.

Pick Encode or Decode, then tick Full URI mode only if you are working with a whole link instead of a single value.

2

Paste and run.

Paste your text or encoded string into the box and click Encode or Decode. Click the button again after you edit the text or change the mode.

3

Copy the result.

Click Copy to put the output on your clipboard, or Swap to move it into the input and run the opposite mode to check it.

Frequently Asked Questions

Answers about percent-encoding, spaces, special characters and the two modes.

What is URL encoding?

URL encoding, also called percent-encoding, replaces characters that are unsafe or have a special job in a link with % and two hex digits. A space becomes %20 and & becomes %26. Letters outside ASCII are turned into UTF-8 bytes first, so é becomes %C3%A9.

What does %20 mean in a URL?

%20 is an encoded space. 20 is the hex code of the space character, so a file named my file.pdf shows up as my%20file.pdf in a link. Paste the link on the Decode tab to turn every %20 back into a space.

What's the difference between encodeURI and encodeURIComponent?

encodeURIComponent encodes a single value and turns : / ? # & and = into % codes. encodeURI encodes a whole URL and leaves those characters alone. This tool uses encodeURIComponent by default and encodeURI when you tick Full URI mode.

Why does a space sometimes appear as + and sometimes as %20?

HTML forms send spaces as + (the application/x-www-form-urlencoded format), while percent-encoding uses %20. This tool always writes %20. When decoding, it leaves + as a plus sign, so swap each + for a space first when you decode form data.

What characters need to be encoded in a URL?

Inside a parameter value, encode everything except A to Z, a to z, 0 to 9 and - _ . ~. Reserved characters such as / ? # & = and + are fine as link structure but must be encoded inside a value. The default mode also leaves ! ' ( ) * as they are.

Is URL encoding the same as Base64?

No. URL encoding only swaps unsafe characters for %XX codes and leaves letters and digits readable. Base64 rewrites all of the data in a 64-character alphabet and makes it about a third longer. For files and binary data, use the Base64 encoder.

When should I use Full URI mode?

Use it when you have a complete link with spaces or non-ASCII letters and want it to stay clickable. It keeps :// / ? & = and # in place. Leave it off for a value you are about to put inside a link, such as a search term or a redirect URL.

Why do I get "URI malformed" when decoding?

The input has a % that isn't followed by two hex digits, such as 100%, a code that was cut off like %E0%A4%A, or a byte that isn't valid UTF-8, like %E9 from older Latin-1 systems. Fix or remove that part and decode again.

How do I fix a double-encoded URL like %2520?

%2520 means a %20 was encoded again, so its % became %25. Decode once to get %20, copy the output back into the input on the Decode tab, and decode again to get the space. Swap won't do it, because it flips to Encode.

How do I decode a URL in JavaScript?

Call decodeURIComponent(value) for a single value or decodeURI(url) for a whole link. They are the same functions this tool runs, so its output matches what your code will produce. Wrap the call in try/catch, because a broken % code throws a URIError.

Is the text I paste sent anywhere?

No. Encoding and decoding happen in your browser, and your text is never sent to PixConvert. On the live site, analytics record clicks like Copy and the time a run took, plus the error text such as URI malformed when a decode fails.

URL Encoder and Decoder With Two Modes

Encode or decode a single query value or a whole link, with UTF-8 for any language, Swap to reverse a result and one-click copy.

URL encoder turning C++ & C# café into C%2B%2B%20%26%20C%23%20caf%C3%A9, with each character and its % code

Percent-Encode Query Values and Text

The default mode encodes every character that could break a link, including & = ? / # and spaces, so a value is safe inside a query string. Spaces become %20 and é becomes %C3%A9.

  • Spaces become %20, not +
  • UTF-8 bytes for accents, CJK and emoji
  • Unreserved characters stay as typed
Try now
URL encoder in Full URI mode: a b/?q=café becomes a%20b/?q=caf%C3%A9 while : / ? & = # and + stay in place

Full URI Mode for Whole Links

Tick Full URI mode to encode a complete link. It keeps :// / ? & = and # in place and encodes spaces, accents and other unsafe characters, so a b/café becomes a%20b/caf%C3%A9.

  • Keeps :/?&=# and + in place
  • Off by default; tick it before you run
  • Full URI decode leaves %2F and %23 encoded
Try now

Private, Free, No Sign-Up

No account needed. The text you paste is encoded in your browser and never reaches us. Analytics record clicks like Copy and the time a run took, never what you paste.

Swap in One Click

Swap moves the output into the input, flips between Encode and Decode and runs it, so you can check that an encoded value decodes back to the original.

Query String Friendly

Encode one value at a time, such as a search term with & or =, then paste it after the = in your link. Encoding a whole query turns its & and = into codes.

Keeps Line Breaks and Spaces

Newlines become %0A, tabs %09 and leading or trailing spaces %20, so multi-line text and padded values come back exactly the same after a decode.

When to URL-Encode

URL encoding is required any time user-supplied text enters a URL.

Query Parameters

Encode search terms, filter values and form input before you add them to a link, so characters like &, = and # don't split the query string.

  • Encode a search term like C++ & C# safely
  • Keep & and = inside one value from breaking the link
  • Turn spaces into %20 for links in emails and docs

Redirect URLs

Encode a full callback link in the default mode before you pass it as a redirect_uri or return URL, so its :// / ? and & stay inside one parameter.

  • Encode an OAuth redirect_uri value in one step
  • Wrap a return URL inside a login link
  • Decode a redirect parameter to see where it points

API Development

Decode percent-encoded values from logs, webhooks and query strings to read them, or encode test values for API calls you write by hand in curl or a script.

  • Read encoded values in server logs and webhooks
  • Encode test values for hand-written curl commands
  • Spot double encoding like %2520 in a parameter