Skip to content
Back

URL Encoder / Decoder

Encode, decode and parse URLs and query strings.

What are you encoding?

Make text safe for a link, or read an encoded one

URL Encoder / Decoder has three modes. Encode turns spaces, accented letters and symbols into %-escapes such as %20, Decode turns them back into readable text, and Parse a URL breaks an address or query string into its parts with every parameter decoded.

It uses your browser’s built-in URL functions, and the result appears as you type. Nothing you paste leaves the page, so links containing tokens or personal details stay on your device.

How to encode, decode or parse a URL

  1. Choose Encode, Decode or Parse a URL at the top.
  2. Paste your text, encoded string or address into the box.
  3. When encoding, answer “What are you encoding?”: Part of a URL for a single value, or A whole URL for a complete address.
  4. When decoding form data, tick “Treat + as a space (HTML form data)”.
  5. Click Copy result. “Use result as input” moves the result up and swaps Encode and Decode, a quick round-trip check.

Reading the output in each mode

  • Part of a URL escapes everything except letters, digits and - _ . ! ~ * ' ( ), including / ? & = #. A space becomes %20.
  • A whole URL leaves the characters that hold an address together, such as : / ? & = #, and escapes spaces, non-ASCII text and a literal %.
  • Non-English characters are encoded as UTF-8 bytes, so “é” becomes %C3%A9.
  • Parse a URL lists the Protocol, Host, Path and any Fragment, then a table of query parameters. Repeated names each get their own row, and blank values show as (empty).

Where URL encoding comes up

  • Building a query string: put a search term or a return address into a link without its & or = breaking the URL.
  • Reading tracking links: decode a long marketing or redirect URL to see where it really goes and which parameters it carries.
  • Debugging an API call: check that a value was escaped once, not twice, before blaming the server.

Avoiding double-encoded links

  • Encode each value with Part of a URL before joining the pieces with ? and &. Encoding the finished address that way would also escape its slashes.
  • A whole URL also escapes the % sign, so an address that already contains %20 turns into %2520. Decode it first if you’re not sure.
  • If an escape is broken, Decode shows no result and points to the problem, for example the position of a % that isn’t followed by two hex digits.
  • If you need to pack binary data or JSON into a link, the Base64 Encoder with URL-safe output is often a better fit.

URL Encoder / Decoder: common questions

Should a space be %20 or +?

Encoding here always produces %20, which works everywhere in a URL. A + only means a space in HTML form data and query strings, so tick “Treat + as a space” when decoding those. Parse a URL treats + in query parameters as a space automatically.

Why does Parse a URL say my text isn’t a URL?

It needs either a full address that starts with a scheme and :// (such as https://) or a query string containing = or &, like a=1&b=2. A bare address such as example.com/page is neither; if it has a ? followed by parameters, only the part after the ? is read, as a query string.

What does “doesn’t form valid UTF-8 text” mean?

The %-escapes are well formed but don’t add up to real characters — usually because a multi-byte character such as an emoji was cut in half when the link was shortened or truncated.

Does decoding change anything other than %-escapes?

No. Every %XX sequence becomes its character, including encoded slashes and ampersands, and the rest of the text is left as it is. A + is only changed when you tick the option.

Is my URL sent anywhere?

No. Encoding, decoding and parsing all run in this page. Related tools are in Developer Tools.