Skip to content

URL encoder and decoder

Decode or encode a URL, query string or value as UTF-8, see each parameter in a table, and unwrap Outlook Safe Links and Proofpoint links. Nothing is uploaded.

  • Runs in your browser
  • Nothing is uploaded
  • Free, no sign-up

Encoded as you type, as UTF-8.

Encoding options

Encodes everything but letters, digits and - . _ ~, so & = ? / # can't break the address.

How it works

To URL encode, type or paste text and the encoded form appears as you type. Text is turned into UTF-8 bytes first, the way browsers, servers and programming languages read addresses, so accents, other scripts and emoji come out right. One part encodes everything but letters, digits and - . _ ~, as RFC 3986 asks; it also encodes ! ' ( ) *, which JavaScript's encodeURIComponent leaves, and both decode the same. A whole URL keeps the address working and encodes only what can't be in one, and writes a domain with accents (café.fr) in punycode (xn--caf-dma.fr), as browsers do.

To URL decode, paste an encoded address, query string or value. A % that isn't followed by two hex digits, and codes that aren't valid UTF-8, are named with their position instead of being passed through, and Show where selects them. Addresses from older sites sometimes encode letters in Windows-1252 (Latin-1), where é is %E9 rather than %C3%A9; choose that character set to read them. If the result still holds %-codes, the text was encoded twice, and Decode again takes it one step further.

When you decode a URL or a query string, its parts are listed: scheme, host, port, path and fragment, and every query parameter as a row with its name and decoded value, so a long tracking or redirect address can be read at a glance and any value copied. Outlook Safe Links and Proofpoint URL Defense links are unwrapped to the address they protect.

Questions

What is URL encoding (percent-encoding)?

A web address may only hold letters, digits and a few signs, and some signs have jobs: ? starts the query, & separates parameters, = joins a name to its value, # starts the fragment. Anything else, or one of those signs used as plain text, is written as % and two hex digits for each of its bytes in UTF-8. A space becomes %20, & becomes %26, é becomes %C3%A9 and an emoji takes four codes. URL decoding turns the codes back into the characters.

Should I encode a whole URL or just one part of it?

Encode each part on its own when you build an address, such as a search term or a redirect address that goes in a query value: everything but letters, digits and - . _ ~ is encoded, so an & or = inside the value can't break the address (this is what encodeURIComponent, rawurlencode and urllib's quote do). Choose A whole URL only to tidy an address that is already put together but holds spaces or accents: it keeps : / ? # & = and the %-codes already there, so nothing is encoded twice.

Is a space %20 or +?

Both, in different places. %20 is a space anywhere in a URL. + means a space only in a query string sent by an HTML form (application/x-www-form-urlencoded), which is why search addresses often show q=hello+world; in a path a + is a plus sign. Encoding writes %20 unless you tick Spaces as +. Decoding reads + as a space unless you untick it, and in a whole URL only in the query, where forms put it.

How do I find the real address behind an Outlook Safe Links or Proofpoint link?

Paste the whole link into Decode. Outlook's Safe Links (safelinks.protection.outlook.com) and Proofpoint URL Defense (urldefense.com, versions 1, 2 and 3) wrap the address a link goes to, so their check runs when you click it. The page shows the address inside, even when one wraps the other, and splits it into its parameters. It never opens the address, and a Proofpoint link that is cut short is refused rather than guessed. Remember that visiting the address directly skips your email service's check.

Limits

Text up to 2,000,000 characters. Results longer than 200,000 characters are cut short in the box, but Copy and Download give all of it, and the table lists the first 500 parameters.

Text is encoded as UTF-8; Windows-1252 is offered for decoding only. Parameters are split at &, not at ;. A Proofpoint v3 link is shown only when every character it took out is accounted for exactly; one cut short in an email or written in a form the page doesn't know is refused. Some other link wrappers, such as Mimecast's, keep the real address on their own servers, so no page can read it from the link.

Encoding isn't encryption: anyone can decode it, so a password or token in a URL is as exposed as plain text.

Privacy

This tool runs entirely in your browser. The files you open and what you type are never sent to a server, and nothing is stored after you close the page. See the privacy page.

Related tools