Skip to content

URL Parser

Break a URL into its components.

Input
Output

No result

About URL Parser

URL Parser breaks an address into the parts it is actually made of using the standard URL parsing rules that browsers implement. It reports the scheme, the user information, the host and hostname, the port, the path, the query string, the fragment and the origin, each on its own labelled line.

Two fields show detail that is easy to lose. The port field reports the port when one was written explicitly and says so when it was not, which distinguishes an address that specified the default from one that relied on it. And the origin is reported as the combination of scheme, host and port, which is the unit that browser security policy operates on and the value that matters when you are checking whether two addresses count as the same site.

A complete address is required. The parser needs an explicit scheme, so an address written without one is rejected as invalid rather than assumed to be secure — a deliberate choice, since guessing the scheme is how a request ends up somewhere you did not intend. Keep in mind too that any credentials in the address are shown in plain text, so do not paste a URL containing a live password.

How to use URL Parser

  1. 1 Paste the complete URL, including the scheme.
  2. 2 Read the labelled components to see how the parser has divided it.
  3. 3 Check the origin line when you need to know what the browser would treat as the site boundary.

Frequently asked questions

Why is my URL rejected when it works in a browser?

Browsers silently add a scheme for you when one is missing, and this parser does not. Supply the scheme explicitly — that is also the safer habit, since an address without one does not say whether it should be fetched securely.

What is the difference between host and hostname?

The hostname is the name alone; the host includes the port when one was given. So an address on the default port has identical values for the two, while one on an unusual port does not.

Why does the port say default rather than a number?

Because no port was written in the address, so the scheme supplies one implicitly. The label makes the difference visible between an address that stated the standard port and one that left it out.

How is the query string separated from the path?

Everything after the first question mark up to the fragment marker is the query, and it is reported intact rather than split into parameters. That is deliberate, since parameter semantics vary by site and guessing at them would misrepresent the address.

Free, online, and private

Free to use

URL Parser is completely free. There is no account to create, no login, and no hidden charge or usage limit.

Runs online in your browser

It is a free online tool that runs entirely in your browser. Nothing to download or install — open the page and start using it right away.

Your data stays private

All processing happens locally on your device. Your input is never uploaded, stored, or tracked, so it never leaves your browser.

How URL Parser behaves in detail

These are the specifics of this implementation — the exact ranges, defaults and fixed settings you are working with.

Parameter Value
Output rows ten, in this order: protocol, username, password, host, hostname, port, pathname, search, hash, origin
Parser the platform URL constructor — no custom regex is involved, and the input is trimmed first
Empty components rendered as (empty); an absent port is special-cased and shown as (default)
Query string reported raw in the search row — parameters are not split into key and value pairs
Failure line the single line "Invalid URL", produced by the catch around the constructor

Compiled from the implementation of this tool and checked against it by itoolnet.

What URL Parser does not do

Knowing the edges of a tool saves more time than another list of its features. These are the cases where it will not do what you might expect.

  • The input has to be absolute. The URL constructor requires a scheme, so a bare example.com/a?b=1 throws and the tool answers "Invalid URL" instead of assuming https for you.
  • The path is reported the way the platform parser normalises it: /a/../b is shown as /b, and a percent-encoded space stays as the literal characters %20 because nothing decodes the path or query back to readable text.
  • Credentials are printed in full. A URL of the form scheme://user:pass@host puts the password into the password row as plain text and the query into the search row, so a signed or credentialed link is fully exposed on screen.

Tested and documented by itoolnet, the team that builds and maintains this site.

Share & embed this tool

Writing a guide or article? You are welcome to link to URL Parser with the snippet below. It is free, runs entirely in your browser, and needs no signup.