URL Parser
Break a URL into protocol, host, path, and query parts.
Components
- Protocol
- https:
- Username
- user
- Password
- pass
- Hostname
- example.com
- Port
- 8080
- Path
- /path/to/page
- Query
- ?q=test&lang=en
- Fragment
- #section
- Origin
- https://example.com:8080
Query Parameters (2)
qtest
langen
Query Parameter Editor (Two-Way)
=
=
Anatomy of a URL
A URL is made of several parts: the scheme/protocol (https:), optional credentials, host and port, path, query string, and fragment. This parser uses the browser's native URL API to split any absolute URL into those components and decode each query parameter. Useful for debugging redirects, links, and API endpoints — all locally in your browser.
Built and maintained by Meet Shah · Last updated
What this tool is used for
- Breaking a long URL into parts to see where a parameter actually landed.
- Checking whether a fragment is swallowing part of a value.
- Confirming the host and port a URL resolves to.
- Auditing a redirect chain by parsing each target in turn.
- Working out why a client library rejects a URL.
Frequently Asked Questions
- Why is the port missing from the components list?
- Empty components are hidden, and the URL API normalises a default port away — https://example.com:443/ reports no port at all, while :8080 shows up. The same rule hides username, password and fragment when the URL carries none, so the list only ever shows parts that exist.
- Why did editing one parameter rewrite the whole query string?
- The editor rebuilds the query with URLSearchParams, which serialises in application/x-www-form-urlencoded form. That writes a space as + rather than %20 and percent-encodes a different set of punctuation, so ?q=a%20b returns as ?q=a+b. Both decode to the same value; only the bytes differ.
- Are duplicate parameter names preserved?
- Yes. ?tag=a&tag=b lists two rows and edits or deletes them by position, so removing the first leaves the second intact. Tools that collapse repeats into one value silently change meaning for APIs that read a repeated key as a list — PHP and Rails conventions differ here too.
- Is the URL I paste kept private?
- No, and that is a deliberate trade. This field is URL-bound so a parse can be shared or bookmarked, which means whatever you paste also sits in this page's address bar, browser history and copied link. Do not paste URLs carrying session tokens, signed download links or user:pass@ credentials.
- Why won't a relative URL parse?
- Because new URL() needs an absolute reference — with no scheme it cannot tell a host from a path, so /path/page?q=1 is rejected where https://example.com/path/page?q=1 parses. Any scheme works, not only http: mailto:, data: and custom app schemes all split into components.
Common errors and gotchas
- Assuming the fragment reaches the server, which it never does.
- Treating a URL without a scheme as absolute, which most parsers do not.
- Overlooking that userinfo in a URL is deprecated and often stripped or blocked.
- Reading a trailing slash as insignificant, when for a path it can be a different resource.
- Assuming the parsed query preserves repeated keys, which depends entirely on the parser.
Related Developer Utilities tools
RegExp Tester
Test regular expressions and inspect matches locally.
Regex Visualizer
Visual regex pattern diagram with live match highlighting and capture group annotations.
Subnet Calculator
Compute CIDR subnets, usable hosts, and network ranges.
Cron Parser
Translate cron syntax into plain English.
HTML Previewer
Paste HTML and see it rendered live in a safe, sandboxed preview.
HTTP Status Code Reference
Search and look up every HTTP status code and its meaning.
MIME Type Lookup
Find the MIME type for a file extension, or the extensions for a MIME type.
ASCII Table
Full ASCII table with decimal, hex, octal, and binary values for every character.