free tool

URL parser and query string builder

Paste a URL to break it into parts, edit or add query parameters interactively, encode/decode strings, and copy the equivalent Python urllib / requests code.

Runs in your browser. Edit parameters below to rebuild the URL.
try:

How to use it

  1. Paste any full URL above. It splits into scheme, host, port, path, query string, and fragment.
  2. Edit, add, or remove rows in the Query parameters table to rebuild a clean, properly percent-encoded URL.
  3. Copy the generated Python requests.get(url, params=...) snippet into your scraper.

Common mistakes

  • Concatenating query strings by hand. An unescaped & or # inside a parameter value breaks the URL; always use params= or URLSearchParams.
  • Sending #fragment to a server. Everything after # stays in the browser and is stripped before an HTTP request is sent.
  • Dropping repeated keys. Using a plain Python dict collapses ?tag=a&tag=b; pass a list of values {"tag": ["a", "b"]} to requests or httpx.

FAQ

Why does a URL fragment (#section) disappear in server logs?

Browsers never send the #fragment over HTTP to the server; it is used only client-side (or by single-page apps). Scrapers fetching HTML only need the part before #.

Why should I pass params= as a dict in Python requests instead of string concatenation?

Passing params={...} lets requests or httpx percent-encode spaces, & and non-ASCII characters properly, preventing broken URLs and parameter injection bugs.

What is the difference between %20 and + in query strings?

URL paths always encode spaces as %20, while application/x-www-form-urlencoded query strings often encode spaces as +. URLSearchParams in browsers and urllib.parse.urlencode in Python handle both.

Can a query parameter appear more than once?

Yes, e.g. ?tag=python&tag=scraping. Edit or add rows in the query table above to keep repeated keys intact.

Is the URL sent to your server?

No. Parsing, rebuilding and encoding all run in JavaScript in your browser.