URL Parser
A URL (Uniform Resource Locator) has up to 7 components: protocol (https:), authentication (user:pass@), hostname (example.com), port (:8080), pathname (/api/data), query string (?key=value), and fragment (#anchor). Query parameters are key=value pairs separated by &. Percent-encoding converts special characters: space → %20, & → %26. The fragment is never sent to the server.
Parse any URL into its components: protocol, hostname, port, pathname, query parameters, and fragment. Shows each query parameter in a table with individual copy buttons. Free, no signup.
URL to Parse
How to Use
- 1
Enter the URL
Paste or type any full URL including the protocol (https://) into the input field
- 2
View components instantly
The parser automatically breaks the URL into protocol, hostname, port, path, query string, and fragment
- 3
Inspect query parameters
Scroll to the Query Parameters table to see each key-value pair decoded and listed individually
- 4
Copy individual values
Click the copy button next to any component or parameter value to copy just that part
Frequently Asked Questions
- What does a URL parser do?
- A URL parser breaks a URL into its individual components: protocol (https://), hostname (example.com), port (:8080), pathname (/api/v2), query string (?key=value), and fragment (#anchor). It also splits query parameters into a key-value table so each parameter can be inspected or copied individually.
- What are the parts of a URL?
- A URL has up to 7 parts: (1) Protocol/scheme — "https:" or "ftp:". (2) Authentication — optional "user:pass@". (3) Hostname — the domain name or IP. (4) Port — optional ":8080". (5) Pathname — the path after the hostname like "/api/data". (6) Query string — parameters after "?" like "?id=42&sort=asc". (7) Fragment — the anchor after "#" used for in-page navigation.
- How do I decode URL query parameters?
- URL query parameters are percent-encoded: spaces become %20 or +, special characters like & and = are encoded to avoid ambiguity. The parser automatically decodes percent-encoding and displays the human-readable value. For example, "q=hello+world" becomes "hello world" and "%E2%9C%93" becomes "✓".
- What is the difference between hostname and origin?
- Hostname is just the domain name (e.g., "example.com"). Origin includes the protocol and port: "https://example.com:8080". Origin is used in CORS (Cross-Origin Resource Sharing) headers to control which domains can access API resources. Two pages have the same origin only if protocol, hostname, and port all match.
- What is a URL fragment (#)?
- The fragment (hash) is the part after "#" in a URL, like "#section-2". It is never sent to the server — browsers use it purely for client-side navigation (scrolling to an anchor, SPA routing). JavaScript can read it via window.location.hash. Single-page apps like React Router use hash-based routing (#/about) as an alternative to HTML5 history routing.
- Why does a URL need to start with https://?
- The browser's URL parsing API (used by this tool) requires a fully-qualified URL with a scheme like "https://" or "http://". Without it, the parser cannot determine whether "example.com/path" is a hostname with a path or a relative file path. Always include the protocol when using URL parsing tools.