URL Parser

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

Category: Dev Tools

When to use?

Use it to separate and check the host, path, query parameters, and hash from a long URL.

How to use

  • Enter a URL.
  • It parses with the browser URL API.
  • Check the components as JSON.

Input Explanation

Enter a full URL starting with https://.

Calculation Basis

It uses the browser URL object to extract protocol, host, pathname, searchParams, and hash.

Usage Examples

  • Debug links - Check that query parameters are attached correctly.
  • Quick pre-deploy check - Check inputs and output to reduce errors before dev/ops work.
  • Aid docs/reviews - Copy the result into dev docs, issues, or review comments.

Examples

  • https://example.com/a?q=1 → path: /a, query: {q: "1"}
  • A URL with several query parameters → split into host, path, parameters

Cautions

  • Generated output is for reference; test carefully before production use.
  • URL parsing runs only in the browser and is not sent out.

FAQ

Do relative paths work?

It currently works on full URL input.

Is the pasted URL sent out?

No. URL breakdown runs only in the browser.

Is the hash (#) part separated?

Along with protocol·host·path·query, it separates the fragment after #.

Are query parameters shown separately?

Yes, it splits the query string after ? into a key-value list so you can see which parameters are present.

Related Tools