Black Friday: 50% off every paid plan with code BF50. Ends 5 December.

See prices

Free tool

URL encode and decode, percent encoding.

Paste an encoded URL to read it, or text to percent-encode it. Encode one part, like a query value, or a whole address, which keeps its slashes and leaves % codes that are already there alone, so nothing is encoded twice. A stray % never stops decoding, and text encoded twice is spotted. Any URL or query string is split into its parts, with every parameter decoded and ready to copy.

Need a custom tool, app or website? Contact us 
Input
Encoded

A whole URL keeps / ? & = # and any % codes already there. One part encodes those too.

Auto decodes when the text has % codes in it, and encodes when it does not.

Encoded and decoded in your browser. Nothing is sent anywhere or saved. Only your settings are remembered on this device.

Percent encoding

Safe characters for a URL.

01 / Encode

Spaces and symbols

Characters a URL cannot hold become % and two hex digits: a space is %20, é is %C3%A9.

02 / Part or whole

Know which you need

A query value must encode & and =; a whole URL must keep them. Pick the one you mean.

03 / Read

Split into parts

Any full URL is broken into scheme, host, path and each query parameter, decoded.

Guide

How to URL encode and decode, without breaking the link.

URL encode and decode means swapping characters a web address cannot carry for a % sign and two hex digits, then turning them back. A space becomes %20, an ampersand becomes %26, and an accented letter like é becomes %C3%A9, which is its two UTF-8 bytes. This tool does both directions in your browser, lets you choose between encoding one part of a URL or a whole address, and splits any full URL into its scheme, host, path and query values so you can read it.

How to use the URL encoder and decoder

  1. Paste your text or URL into the Input box. With Auto selected, the tool guesses what you want: if the text already has % codes in it, it decodes, and if not, it encodes. The status line says which it did, and the result updates as you type.
  2. Pick what you are encoding in the Encode menu. Choose One part for a search term or a single query value. Choose A whole URL for a full address that has spaces or accents in it. Tick Strict RFC 3986 if the place you paste into also wants ! ' ( ) * encoded.
  3. Tick Spaces as + only if the place you are pasting into expects form-style query strings.
  4. Press Encode or Decode in the side panel to force a direction if the guess was wrong. Tick Each line on its own to do a list, one value per line.
  5. Read the Parts of the URL table under the boxes. Each query parameter gets its own row, already decoded, with a Copy link. A query string on its own, like utm_source=news&page=2, is split too.
  6. Press Copy the result, or Use as input to run it through again.

One part or a whole URL: the choice that matters

Some characters have a job in a URL. The slash separates folders, ? starts the query string, & separates parameters, = joins a name to its value and # starts the fragment. Encoding a whole URL keeps those characters as they are, so the address still works. Encoding one part turns them into % codes, so they become plain text inside a value instead of breaking the URL apart.

Here is why it matters. Say you want a search link for the phrase red shoes & socks. If you encode the whole address https://example.com/search?q=red shoes & socks, the & is kept, and the site reads the query as q=red shoes plus a second, empty parameter called socks. The fix is to encode just the phrase with One part, which gives red%20shoes%20%26%20socks, and then paste that after q=. Now the & is part of the search term.

A simple rule: if you are building a URL from pieces, encode each value with One part and join them with the normal / ? & and = characters yourself. Use A whole URL only to clean up an address someone typed with spaces or accents in it.

A whole URL also leaves any % code that is already in the text alone. Paste https://example.com/a%20b/c d and only the second space is encoded, giving a%20b/c%20d. The browser's own encodeURI() would turn the first one into %2520.

Common characters and their codes

CharacterEncodedKept by A whole URL?
space%20 (or + in form style)No, always encoded
&%26Yes
=%3DYes
?%3FYes
/%2FYes
#%23Yes
+%2BYes
%%25No, always encoded
"%22No, always encoded
é%C3%A9No, always encoded

Letters, digits, the hyphen, underscore, full stop and tilde are never encoded. The asterisk, apostrophe, round brackets and exclamation mark are left alone too, as JavaScript does, unless you tick Strict RFC 3986, which encodes them as %2A %27 %28 %29 %21. Some signing schemes for APIs, such as OAuth 1.0, need the strict form.

%20 or +: which to use for spaces

%20 means a space everywhere in a URL. The + sign means a space only inside a query string sent the way an HTML form sends it, which is why some search pages show ?q=red+shoes. In a path, a + is just a plus sign. If you are not sure, leave the box unticked and use %20.

The same box changes decoding. With it ticked, every + is read as a space before the % codes are decoded. Leave it unticked when you decode a link where + is meant literally, like a phone number or C++.

Common problems and the fix

  • Double encoding. If you see %2520, a %20 was encoded a second time: the % became %25. After decoding, the tool notices that % codes are still there and shows Decode again above the result.
  • A stray % sign. A % that is not followed by two hex digits, like 100% or %G1, is kept as written, and the status line says where it is. The rest is still decoded.
  • Odd letters like é instead of é. The link was encoded in an older character set. With the default setting, bytes that are not UTF-8 are read as Windows-1252 and the status line says so. You can also pick the set under Character set.
  • A link with a + in it now has a space. You decoded with Spaces as + ticked. Untick it and decode again.
  • No parts table appears. The table shows for a full URL, an address that starts with a domain like example.com/, or a query string. Plain text has no parts to show.

The same thing in code

If you write code, this tool uses the same functions your browser gives JavaScript. One part matches encodeURIComponent(). A whole URL is like encodeURI(), except that % codes already in the text are kept. Decoding gives the same result as decodeURIComponent(), without stopping at a stray %. In Python, urllib.parse.quote() and quote_plus() do the same jobs, the second one with + for spaces. In PHP, rawurlencode() gives %20 and urlencode() gives +. Testing a value here first is a quick way to see what your code should produce.

Working with tokens or API responses too? The Base64 decoder and the JWT decoder handle the other encodings you often find inside URLs, and the JSON formatter makes a decoded payload readable.

Questions

Good to know.

What is URL encoding?

Replacing characters that are not allowed in a URL with a % and their byte value in hex, so the URL survives being sent.

Should a space be %20 or +?

%20 works everywhere. + means a space only in form-style query strings.

Encode one part or the whole URL?

One part for a value you put into a query string; whole for an address with spaces or accents in it.

What if my text has a broken % code?

It is kept as written and the rest is decoded. The status line says where each stray % is, so you can fix it.

Is anything sent anywhere?

No. Everything happens in this tab and nothing is saved. Only your settings are remembered on this device.

What is strict RFC 3986 encoding?

RFC 3986 is the standard for URLs. It lets ! ' ( ) * appear as they are, but some systems, such as OAuth 1.0 signatures, want them encoded too. Tick the strict option to encode them.

What does %20 mean in a URL?

It is a space. URLs cannot contain a real space, so it is written as % followed by 20, the hex value of the space character.

What does %2520 mean?

It is a space that was encoded twice. The first pass made %20, and the second pass turned the % into %25. Decode it, then press Decode again to get the space back.

Do I need to encode letters with accents?

Yes, to be safe. Browsers often show accented letters in the address bar, but when the URL is sent or pasted into code it should carry the encoded UTF-8 bytes, like %C3%A9 for é.

Is URL encoding a form of encryption?

No. Anyone can decode it in a second. It only makes text safe to put in a URL, so never use it to hide a password or private data.

Listed on

Listed on JustMacAppsMotionShine on Mac App IndexMotionShine on ScrollLaunchMotionShine featured on StartupBaseFeatured on FazierFeatured on Twelve ToolsMotionShine - Featured on Smol Launch