TodayTools

URL encode, decode and parse

Share links with spaces and special characters that work for everyone who taps them.

PrivateNo uploadsRuns in your browser

Donate
Mode
A man on the phone at his desk by a window

For links that work

Links that open every time.

Sharing a search. Sundar shares a search link with spaces in it.

BeforeBroken links in messages

With sdevSafe links that always open

  • Family Playing

    It opens

    The family taps it and it works.

  • Happy Family

    Trip planned

    They book the trip together.

How to encode or decode a URL

  1. Choose a mode

    Encode percent-encodes text, Decode turns %XX escapes back into characters, and Parse URL breaks a full address into its parts. Press Sample to load an example for the current mode.

  2. Pick the style

    One value encodes everything except letters, digits and - _ . ! ~ * ' ( ) and suits a single query value. A whole web address keeps : / ? # & = so a complete address stays a link. Form data writes spaces as + the way HTML forms do.

  3. Copy the result

    The output updates as you type. Press Copy, or Ctrl+C (Cmd+C on Mac) with nothing selected. In Parse URL each part has its own copy button and Ctrl+C copies the normalised URL.

Good to know

  • Use One value for things you put into a link, like a name or search. Use A whole web address only when you already have a complete address with a scheme and path.
  • Form data matters when you read data submitted by an HTML form, where + means a space. Decoding with the One value style keeps + as a plus sign.
  • Parse URL accepts an address without a scheme and assumes https://. Repeated keys such as tag=a&tag=b appear as separate rows, and values are shown decoded.
  • Text is encoded as UTF-8, so Tamil or emoji becomes several %XX groups per character. That is what browsers and servers expect.
  • Decoding is tolerant: a broken escape is left in place while the rest of the text is decoded.
  • Everything runs in your browser using the same functions JavaScript gives to web pages.

Where people use it

  • Read a messy link

    Links full of %20 and %2F become plain words you can read.

  • Build a link with a search

    Encode a name or a phrase so it works safely inside a link.

  • See all the parts of a link

    Break any web address into host, path and each query value in a neat list.

  • Form data

    Encode the way web forms do, with spaces as plus signs.

  • Share a link as a QR

    Once the link is right, turn it into a QR code to print or share.

    QR code generator with logo

Why this one

It explains which kind of encoding to use in plain words, and shows every part of a link as an easy list.

  • Encode a single value or a whole web address.
  • Breaks any link into its parts.
  • Runs in your browser.

What you can change

  • Encode, decode or parse
  • One value or a whole web address
  • Form style with spaces as +

People find this page by searching

  • url encode
  • url decode
  • url encoder online
  • url decoder online
  • percent encoding
  • encode url parameters
  • decode url online
  • url parser
  • query string parser
Cite this tool
  • APA
    sdev.in. (n.d.). URL encoder, decoder and parser [Web tool]. https://www.sdev.in/tools/url-encoder
  • MLA
    "URL encoder, decoder and parser." sdev.in, https://www.sdev.in/tools/url-encoder.
  • Chicago
    sdev.in. "URL encoder, decoder and parser." https://www.sdev.in/tools/url-encoder.
  • BibTeX
    @misc{sdev-url-encoder,
      title = {URL encoder, decoder and parser},
      author = {{sdev.in}},
      howpublished = {\url{https://www.sdev.in/tools/url-encoder}},
      note = {Web tool}
    }

Questions people ask

What is the difference between encodeURI and encodeURIComponent?

One value (encodeURIComponent) encodes every special character, including / ? & and =, so it is right for one value in a link. A whole web address (encodeURI) leaves those characters alone so a complete address stays a working link. Using One value on a whole address breaks it; using A whole web address on a value leaves & and = unencoded and can corrupt the query string.

Why is a space %20 in one style and + in another?

Percent-encoding writes a space as %20. HTML forms and application/x-www-form-urlencoded bodies write it as + instead. Pick Form data when you are reading or producing that format; in the other styles a + is just a plus sign.

Why do I see %25 or %2520 in my output?

The text was already encoded, so the % signs were encoded again. Decode it first, then encode once. Double encoding is the usual cause of links that arrive broken.

Can I decode text that is only partly encoded?

Yes. Every valid %XX escape is decoded and anything malformed, such as a stray % or %ZZ, is left as it is instead of failing the whole string.

Is anything sent to a server?

No. Encoding, decoding and parsing use the browser's own functions on your device. Nothing leaves the page.

Donate