Tools

URL parser

Break a URL into protocol, host, path, query and fragment.

Runs in your browserNetwork1K
Free

Input

0 BFree up to 8.0 KB

Result

The result will appear here.

Your runs

Only runs that cost points are saved.

Sign in to keep a history of your runs.

Splits a URL into its parts using the browser's own WHATWG URL implementation — the same code that resolves the address bar — so the result matches what a browser will actually do with it, including its handling of default ports, unicode hosts and repeated parameters.

How it works

  • Parsing uses the browser's native URL implementation, not a regular expression.
  • Query parameters are expanded into an object so long query strings become readable.
  • A bare host is read as https, which is what a browser assumes.

Where your data goes

Nowhere. This tool runs entirely in your browser: the text you paste is processed by the page and is never transmitted to a server or written to a log.

When a run costs points, a one-line summary is saved to your own history so you can find it again. The summary records the shape of the run — sizes, counts, the values you looked up — never the content you pasted.

What it costs

This tool is free, with no sign-in and no points.

Common questions

Why did my internationalised domain change?
The URL standard converts unicode hostnames to their Punycode form, which is what DNS resolves. The two are the same host.
What happens with a repeated parameter?
The object shows the last value, because that is what most frameworks return for a single-value read. Repeated keys are meaningful in some APIs, so check the raw query string when it matters.
Where did the default port go?
The standard omits :443 for https and :80 for http, since they carry no information. A non-default port is always shown.

The open-source behind it

This tool is a self-contained implementation. unshiftio/url-parse (MIT) does the same job as a library — if you need this behaviour inside your own program, start there rather than calling a web page.

unshiftio/url-parse

Also known as

  • url parser
  • parse url online
  • query string parser
  • url analyzer
  • url components