Saved

Press the star next to a tool's name to save it.

All my tools

URL Parser and Query String Builder

Use this URL parser to split an address into scheme, host, port, path, query parameters and fragment. Edit the parameters and rebuild the link. It runs in your browser.

Paste a full address. If the scheme is missing, https:// is assumed.

Your URL stays in your browser. Nothing is uploaded.

Result

–

Paste a URL and press Parse.

A URL parser splits a web address into its parts so you can read them one by one. Paste a URL, press Parse, and see the scheme, host, port, path, query parameters and fragment. Then change the parameters and rebuild the address with the right percent-encoding.

Long links are hard to read, especially tracking links with a dozen query parameters. A parser shows what each piece is, which helps when you debug a redirect, check a campaign link or build a link by hand. The parsing uses the same URL standard that web browsers follow, and it runs entirely in your browser.

How to use the URL parser and query string builder

  1. Paste a full address, such as https://example.com/shop?id=7&sort=new#reviews.
  2. Press Parse.
  3. Read the table of parts and the table of query parameters.
  4. Edit the parameter lines in the box below, one name=value per line.
  5. Press "Rebuild URL" and copy the new address.

The parts of a URL

The URL standard describes a URL as a record with a scheme, a username and password, a host, a port, a path, a query and a fragment [1]. The table shows what each part holds.

PartExampleWhat it is
schemehttpsThe kind of address and protocol
hostwww.example.com:8443Host name plus port when not the default
port8443The network port
path/shop/itemsThe location on the server
queryid=7&sort=newName and value pairs after the question mark
fragmentreviewsA position inside the page, after the hash sign

Default ports are left out

A default port is stored as nothing. For https that is 443, and an explicit default port is cleared when the address is parsed [1]. So https://example.com:443/ shows no port at all, and its address is shown as https://example.com/. A non-default port such as 8443 stays visible.

Query parameters

Query strings use the application/x-www-form-urlencoded format. In that format a space is written as a plus sign [1]. The parser reads the query with the browser URLSearchParams interface, so a + and a %20 both show as a space in the table, and percent-encoded characters are decoded. Names can repeat, such as tag=a&tag=b, and the tool keeps every pair in its original order.

Rebuilding the address

The edit box shows each parameter as a decoded name=value line. Change a value, add a line or delete one, then press Rebuild. The tool encodes every name and value with percent-encoding, so a space becomes %20, an ampersand in a value becomes %26 and a non-English letter is written as its UTF-8 bytes. Everything before the question mark and the fragment stay as they were. A line with a name and no equals sign is written as name= with an empty value.

Addresses without a scheme

Parsing needs a complete address. A string like example.com/page has no scheme, and the URL standard cannot resolve it without a base address [1]. To be useful, the tool tries https:// in front of it and says so in the result. A string such as localhost:3000/app is also treated as a host and port.

Worked example

For https://user:pw@www.example.com:8443/a/b%20c/index.html?q=hello+world&tag=a&tag=b#section-2 the scheme is https, the username is user, the host name is www.example.com, the port is 8443, the path is /a/b%20c/index.html, the query holds q, tag and tag again, and the fragment is section-2. Editing q to new value and rebuilding gives q=new%20value in the new address.

Cautions

  • Do not paste links that contain passwords or private tokens into tools you do not trust. This one sends nothing, but the habit is safer.
  • The fragment is never sent to the server. Only the browser uses it.
  • A rebuilt address is encoded with %20 for spaces, which every server understands, while some forms use +.

Why query parameters matter

Query parameters carry search terms, page numbers, filters, session hints and campaign tags. When a page behaves oddly, the cause is often one parameter: a duplicate name, a missing value or an encoded character that was decoded twice. Seeing each pair on its own row makes these faults obvious.

  • Duplicates: a name that appears twice may be read as a list by one server and as the last value only by another.
  • Empty values: a name with no value, such as empty=, is kept and shown with a blank value.
  • Encoded characters: %26 inside a value is a literal ampersand, not a separator. The table shows it decoded.

To build a link, paste its base address with no query, press Parse and type the parameters you want, one per line. Press Rebuild and the tool writes the query with correct encoding. This is handy for campaign links, API test calls and redirects where a value holds a full address that itself contains question marks and ampersands. Such a nested value must be encoded, and the rebuild does that.

What next

Use this often? Add URL Parser a to your Home screen.

Frequently asked questions

What does a URL parser do?

A URL parser splits an address into its parts: scheme, username, password, host, port, path, query and fragment. This one also lists each query parameter.

How do I get the query parameters from a URL?

Paste the URL and press Parse. Every name and value in the query is listed in order, decoded, with repeated names kept.

Why does the port not show for my https URL?

A default port, such as 443 for https, is dropped when the address is parsed. Only non-default ports are shown.

How does the query string builder encode values?

It percent-encodes every name and value, so a space becomes %20 and an ampersand becomes %26. The path and fragment are kept as they were.

Can I parse a URL without https?

Yes. If the scheme is missing the tool tries https:// in front and tells you. Other schemes such as ftp and mailto work as written.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Developer Tools