URL Parser
Inspect URL components and query params
Start
{
"href": "https://example.com:8080/path?a=1&b=2#frag",
"protocol": "https:",
"username": "",
"password": "",
"host": "example.com:8080",
"hostname": "example.com",
"port": "8080",
"pathname": "/path",
"search": "?a=1&b=2",
"hash": "#frag",
"params": {
"a": "1",
"b": "2"
}
}Description
The URL Parser helps you quickly analyze a full URL and break it into well‑labeled parts: protocol, host, path, query string, and fragment. Use it to verify links, debug redirects, or inspect query parameters before sending requests. The tool shows a structured JSON view that mirrors what browsers parse via the URLinterface.
It is ideal when working with APIs, tracking URLs with UTM parameters, or refactoring routes. You can toggle whether parameters are decoded and whether single‑value keys are flattened into strings or kept as arrays. Everything runs locally in your browser for fast iteration.
Key features
- Accurate parsing using the standard
URLAPI - JSON output with protocol, host, port, path, search, hash, and params
- Options to decode parameters and flatten single values
- Copy full output or just the query string with a click
- Local persistence of your last input and settings
- Accessible controls and keyboard‑friendly inputs
Common use cases
- Debugging query parameters for API endpoints
- Inspecting UTM tags on marketing links
- Comparing route structures during refactors
- Teaching the anatomy of URLs
Privacy & security: parsing happens entirely in your browser; no data is uploaded. Do not paste secrets you wouldn’t keep on your own device.
How to Use
- Paste a full URL into the input field on the left.
- Toggle “Decode parameters” to see human‑readable values.
- Toggle “Flatten single values” to keep single‑key arrays as strings.
- Click “Copy Output” to copy the structured JSON result.
- Click “Copy Query” to copy only the
?queryportion if present. - Use “Sample” to load a demo URL and verify behavior in your browser.
- Clear the input to return to the empty state and start again.
Tips
- If a URL is relative, prepend the origin (e.g.,
https://example.com). - Invalid URLs show an error; ensure the scheme (http/https) is included.
- Use the query builder to construct parameters from scratch.
Troubleshooting
- Invalid URL → Include a scheme and a valid host, e.g.,
https://. - Params missing → No
?section exists; try “Copy Query” only if present. - Encoded values → Turn on “Decode parameters” to convert
%20→ space.
Example
Example 1: Parsed components
Input:
https://example.com:8080/path?a=1&b=2#frag
Output:
{
"protocol": "https:",
"host": "example.com:8080",
"pathname": "/path",
"params": { "a": "1", "b": ["2"] }
}The tool extracts protocol, host, port, path, parameters, and fragment for quick inspection.
Example 2: Decoding parameters
Input:
https://quicktool.dev/?q=hello%20world
Output (with “Decode parameters” on):
{
"params": { "q": "hello world" }
}Percent‑encoded values are converted to readable text.
FAQ
Does this run locally and is it safe?
Yes. It uses the browser’s built‑in URL parser; nothing is sent over the network.
Why do I see “Invalid URL”?
The input is missing a scheme or host. Try starting with https:// and ensure domains are well‑formed.
Why are some values still encoded?
Disable/enable “Decode parameters” depending on your needs; some APIs expect encoded values.
How are repeated keys handled?
When “Flatten single values” is on, single‑value keys become strings and repeated keys become arrays.
Can I copy just part of the output?
Use “Copy Output” for the full JSON or “Copy Query” for just the query string.
Will it work with very long URLs?
Yes, but rendering huge objects can take a moment; the parser itself is fast.
Does it support non‑HTTP schemes?
Any scheme accepted by the URL constructor should parse, but fields vary by protocol.