AAllMyToolsa pocketful of little tools
url

URL encoder / decoder

DevNo. 76 / 84

Percent-encode text for a URL or decode escapes back into readable text, with component and whole-URL modes that update as you type.

percent signs are load-bearing. we treat them with respect and a little suspicion.

work surface

Math, not advice — results are indicative.Read the disclaimer.

most-used utilities

Search terms

Encode a term with spaces, quotes and an ampersand before it goes into a query string.

Broken links

Decode a pasted link to see what those tracking parameters are actually saying about you.

API paths

Escape a filename or slug that has a slash or a space before it meets a REST endpoint.

pro tips

A space is %20 in a URL, not a plus. The plus belongs to form encoding, which is a different dialect with different manners.

If you are building a query string by hand, encode each value on its own and leave the separators alone — that is the whole point of component mode.

Decoding twice is how %2520 turns into a space and a mystery turns into a bug report. Decode once, then look.

what it does

Paste a value, pick a direction, and the result appears as you type. Encode turns spaces, slashes, question marks and non-ASCII characters into percent escapes; decode turns them back into something a human can read. Nothing leaves the browser, which is the only respectable behavior for a text box.

Component mode is the strict one: everything except letters, digits and a small set of punctuation gets escaped, which is what you want for a single query value. Whole URL mode is the polite one: it leaves the structure characters alone — question mark, ampersand, equals, slash and hash — so the link still points where it should.

It earns its keep when a search term with spaces has to survive inside a query string, when an API path insists on escaped segments, when a log line is nothing but percent signs, or when a link arrives broken because someone pasted a raw ampersand into it and called it a day.

Malformed escapes do not throw an error: the widget keeps the stray percent sign and decodes whatever valid sequences it can find, with a note saying so. It follows the JavaScript rules, so a plus sign stays a plus sign — that leftover from form encoding is not the same thing as a space.

quick answers

What is the difference between component and whole URL mode?

Component mode escapes everything that is not safe inside a single value, including slashes and question marks. Whole URL mode keeps the separators intact so an entire link survives the trip.

Why did my plus sign not become a space?

Because plus-as-space is a rule from form encoding, not from URL encoding. This tool follows the URL standard, where a plus is just a plus; replace it yourself if the source used form encoding.

What happens with a broken percent escape?

Nothing explodes. The decoder keeps the stray percent sign, decodes the valid sequences around it and leaves a short note, so one typo does not wipe out the whole result.