ToolHub

URL Parser

Break any URL into its parts

URL Parser

URL parts

Protocol

https:

Username

user

Password

pass

Hostname

www.example.com

Port

8080

Pathname

/path/to/page

Search (raw)

?utm_source=google&id=42&q=hello

Hash

#section

Origin

https://www.example.com:8080

Query parameters (3)

KeyValue
utm_sourcegoogle
id42
qhello

Paste any URL to break it into its parts: protocol, host, port, path, query string, and fragment. Query parameters are split into a key and value table. Everything runs in your browser using the built-in URL API.

Overview

Break any URL into its parts instantly

A URL packs a lot of information into a single line: the protocol, an optional username and password, the host, an optional port, the path, the query string, and a fragment. When you are debugging a redirect, inspecting a tracking link, or figuring out why a request fails, you often need to see each of those pieces on its own.

ToolHub URL Parser does exactly that. Paste a URL and it splits out every component and lists each query parameter as a clean key and value pair. It uses the same URL API that browsers use, so what you see matches how a browser actually reads the address. Everything happens in your browser.

Step-by-step

How to use the URL parser

  1. 1

    Paste your URL

    Drop any full URL into the input box. Include the scheme, likehttps://, so it can be parsed correctly.
  2. 2

    Read the parts

    The tool instantly shows protocol, username, password, hostname, port, pathname, search, hash, and origin. Click the copy icon next to any value to grab it.
  3. 3

    Inspect the query string

    Every query parameter is broken out into a key and value table, so you can see exactly what data the link carries.

Background

The anatomy of a URL

A full URL follows a predictable shape:scheme://user:password@host:port/path?query#fragment. Most everyday links only use a few of those pieces, but each one has a specific job and the parser surfaces all of them.

Origin, host, and hostname

The hostname is the domain on its own, likewww.example.com. The origin combines the protocol, host, and port into the security boundary browsers use for same-origin checks. Knowing the difference matters when you debug CORS or cookies.

Search string vs query parameters

The raw search string is everything after the question mark, including the leading ?. The parser also decodes that string into individual parameters so you do not have to split on ampersands and equals signs by hand.

The fragment never reaches the server

The hash, or fragment, is the part after #. Browsers keep it client side and never send it in the request, which is why it is used for in-page anchors and single page app routing.

Use cases

When a URL parser helps

Debugging tracking links

See exactly which utm_source, utm_medium, and other parameters a marketing link carries before you publish it.

Inspecting API endpoints

Confirm the host, path, and query parameters of an API request when something returns the wrong data.

Auditing redirects

Compare the parts of a source URL and its destination to understand how a redirect rewrites the address.

Teaching and documentation

Show students or teammates how each part of a URL maps to a real example without drawing diagrams.

Validating user input

Quickly check whether a pasted address is a well-formed URL and which host it actually points to.

Reading OAuth callbacks

Decode the code, state, and error parameters that providers append to redirect URLs during sign-in flows.

Tips and best practices

  • Always include the scheme. example.com alone is not a valid absolute URL, but https://example.com is.
  • Query values shown here are already decoded, so %20 appears as a space and plus signs are resolved.
  • A missing port is normal. Browsers imply 443 for https and 80 for http, so the port field is often empty.
  • Userinfo like user:pass in a URL is rarely used today and is ignored by many servers. Treat it as a red flag in untrusted links.
  • The fragment is client side only. If a value must reach the server, it belongs in the query string, not after the hash.

Common questions

Why does it say my URL is invalid?

The most common reason is a missing scheme. The parser needs an absolute URL, so add https:// at the start. Stray spaces or an incomplete address can also trigger the error.

Are my URLs sent anywhere?

No. Parsing happens entirely in your browser using the built-inURL object. Nothing you paste leaves your device, which matters when links contain tokens or personal data.

Why are the query values already decoded?

The searchParams interface decodes percent-encoded characters for you, so the table shows the real human readable values rather than the escaped form that appears in the raw search string.

Can it handle duplicate parameter keys?

Yes. If a key appears more than once, each occurrence is listed as its own row, so you can see every value the URL carries for that name.

100% private

Privacy and security

URL parsing uses the browser native URL API and runs locally. Your links, including any tokens or query parameters, are never uploaded or stored.

Related tools

Frequently asked questions

Is my URL data sent anywhere?

No. The URL is parsed entirely in your browser using the built-in URL API. Nothing is uploaded.

Why do I get a validation error?

The parser needs a full, valid URL including the scheme, like https://. Add https:// to the front if it is missing.

Does it decode the query parameters?

Yes. Every key and value in the query string is listed in a table, already URL-decoded for you.