URL Encoder and Decoder

Encode text so it can be placed safely in a URL, decode percent-encoded strings back to readable text, and break any URL into its parts — including a table of decoded query parameters. Useful when debugging redirects, tracking links, API requests and form submissions.

Step-by-step guide: What Is URL Encoding (Percent-Encoding)?

How to use the URL Encoder and Decoder

  1. Paste a URL or some text into the input box.
  2. Choose an encoding style. Use Component for a value that goes inside a URL (such as a search term), Full URL to make a whole address safe while keeping its structure, and Form data for application/x-www-form-urlencoded bodies.
  3. Select Encode or Decode. Decoding handles both %20 and, in form mode, + as spaces.
  4. Select Parse URL to see each part of an address and its query parameters decoded in a table.

Example: component versus full-URL encoding

Encoding the search phrase café & bistro:

  • Component: caf%C3%A9%20%26%20bistro — the & is encoded, so it cannot be mistaken for a parameter separator.
  • Form data: caf%C3%A9+%26+bistro — the same, with spaces as +.

Encoding a whole URL with Component would also encode :// and /, breaking it. Use Full URL for complete addresses, which only encodes characters that are never valid in a URL, such as spaces.

Why URLs need encoding

URLs may only contain a limited set of ASCII characters, and some characters have special meanings: ? starts the query, & separates parameters, # starts the fragment. Any other character — a space, an accented letter, or a reserved character used as data — must be percent-encoded: converted to UTF-8 bytes and written as % followed by two hexadecimal digits. For example, a space becomes %20 and “é” becomes %C3%A9.

Encoding errors cause broken links, search terms that arrive truncated at the first &, and tracking parameters that end up in the wrong field.

Which encoding to use

ModeEquivalentLeaves unencoded
ComponentencodeURIComponentA–Z a–z 0–9 - _ . ! ~ * ' ( )
Full URLencodeURIThe above, plus ; , / ? : @ & = + $ #
Form dataURLSearchParamsA–Z a–z 0–9 * - . _ (space becomes +)

The parser uses the browser’s standards-based URL object (the WHATWG URL Standard), the same parser the browser uses to follow links, so the parts it reports match how browsers interpret the address.

Limitations to keep in mind

  • Decoding fails if the input contains a % sign that is not followed by two hexadecimal digits; the tool reports where.
  • Internationalised domain names are shown in their punycode form (xn--…) by the parser, as browsers transmit them.
  • Double-encoded text (%2520) needs decoding twice. Use “Use output as input” to decode again.

How your data is handled

All encoding, decoding and parsing happen in your browser. URLs you paste are not visited or sent anywhere.

Frequently asked questions

Should spaces be %20 or +?

In URL paths and most query strings, use %20. The + form is specific to HTML form submissions (application/x-www-form-urlencoded). Most servers accept both in query strings, but only %20 is correct in a path.

What does %2F mean?

It is an encoded forward slash. It appears when a slash is part of a value rather than a path separator — for example a date like 12/31 passed as a parameter.

Why does decoding show an error?

The text contains a percent sign that does not start a valid encoded byte, such as “100%” or “%G1”. Encode the text first, or fix the stray percent sign.