How to Parse a URL: Break It Into Its Parts Online

How to Parse a URL: Break It Into Its Parts Online

A URL parser breaks any URL into its parts so you can read and edit each one cleanly. Instead of squinting at a long string to find a query value or a stray port number, you get protocol, host, port, path, query string, params, and fragment laid out separately. Here is how to parse a URL and rebuild it.

What a URL parser shows you

Paste a URL and a parser splits it into the pieces the web actually uses:

  • Protocol: the scheme, like https:.
  • Host and port: the domain and, if present, the port number.
  • Path: everything after the host, before the ?.
  • Query string and params: the ?key=value pairs, broken out individually.
  • Fragment: the # part at the end.

The URL Parser follows the WHATWG URL standard, the same rules your browser uses for the native URL() and URLSearchParams objects. So what you see matches exactly how a browser would interpret the address, with no surprises.

Why parsing a URL helps

Reading parts in isolation makes real tasks faster:

  • Debugging redirects: see exactly which path or query value changes between hops.
  • Editing query params: find, change, add, or remove a single parameter without hand-editing the whole string.
  • CORS origin checks: confirm the protocol, host, and port together, since the origin is what browsers compare.

One detail worth knowing: the fragment, the # part, is never sent to the server. It lives only in the browser, so if something on the backend depends on it, that is your bug.

How to parse a URL in two steps

  1. Open the URL Parser and paste your URL into the input.
  2. Read each part in its own field, edit any of them, and copy the rebuilt URL.

Because it reads the parts apart and lets you put them back together, you can tweak a query value or swap a path segment and get a clean, valid URL out the other side. Everything runs in your browser, so the URLs you paste never leave your device.

Paste your URL, read every part at a glance, edit what you need, and copy the result. No guessing where the ? ends.

← All posts