BYTETOOLS

URL Parser

Parse a URL into protocol, host, port, path, query parameters and hash. Handles relative URLs with a base and shows query params in a table. Free and private.

URL components

Origin
https://www.example.com:8080
Protocol
https:
Username
user
Password
pass
Host
www.example.com:8080
Hostname
www.example.com
Port
8080
Path
/path/to/page
Query string
?q=hello&lang=en
Hash
#section

Query parameters (2)

KeyValue
qhello
langen

What is the URL Parser?

The ByteTools URL Parser splits any URL into its individual components: protocol, username, password, host, hostname, port, path, query string and hash.

  • Splits URLs into protocol, host, port, path, query and hash
  • Query parameters shown in a clear key/value table
  • Handles relative URLs when you provide a base
  • Shows origin, username and password components too
  • Clear error message for malformed URLs
  • 100% client-side — URLs never leave your browser

How to use the URL Parser

  1. 1

    Paste the URL you want to inspect into the input box.

  2. 2

    For a relative URL, enter a base URL in the second field.

  3. 3

    Read the breakdown of protocol, host, port, path and hash.

  4. 4

    Review each query parameter in the key/value table.

  5. 5

    Fix the URL if an error message explains what is invalid.

About the URL Parser

The ByteTools URL Parser splits any URL into its individual components: protocol, username, password, host, hostname, port, path, query string and hash. Query parameters are laid out in a clear key-and-value table so you can inspect exactly what is being passed.

It uses the browser's native URL engine, the same one your JavaScript uses, so results are accurate and standards-compliant. For relative URLs you can supply a base, and if a URL is invalid the tool explains why instead of failing silently.

All parsing happens locally in your browser, so URLs containing tokens, IDs or other sensitive query data are never uploaded. It is a fast way to debug links, redirects, tracking parameters and API endpoints.

Frequently asked questions

How do I break a URL into its parts?

Paste the URL and the tool immediately lists its protocol, host, port, path, query string and hash, plus a table of individual query parameters. It uses the browser's standards-based URL parser for accurate results.

What is the difference between host and hostname?

The hostname is just the domain, like www.example.com, while the host includes the port when one is present, such as www.example.com:8080. The parser shows both so you can see the distinction clearly.

Can it parse a relative URL?

Yes. Enter the relative URL in the main box and provide a base URL in the second field. The parser resolves the relative reference against the base to produce a full, absolute URL and its components.

Why is my URL reported as invalid?

The parser follows the strict URL standard, so a missing protocol, illegal characters or a malformed structure will be rejected. The error message describes the problem, and for a path-only value you can supply a base URL to make it valid.

How are repeated query parameters handled?

Each occurrence of a repeated parameter is listed as its own row in the query table, so a URL with two tag values shows both rather than collapsing them, letting you see the full set of values.

Is my URL uploaded when I parse it?

No. Parsing runs entirely in your browser, so URLs that contain access tokens, session IDs or private query data stay on your device.

Guides for URL Parser

Related tools