Debug an OAuth callback
Confirm the exact origin, path, and query values returned by an identity provider.
Parse and inspect URLs locally: protocol, origin, hostname, port, path, query parameters, and fragment in one readable view.
Break a URL into every meaningful part. Your result updates in the current tab as you work.
Break a URL into every meaningful part. Nothing you enter here is uploaded or stored.
Query values are decoded and grouped into a readable object.
{
"protocol": "https:",
"origin": "https://sovrancode.com",
"hostname": "sovrancode.com",
"port": "default",
"pathname": "/en/courses/html",
"query": {
"level": [
"beginner"
]
},
"hash": "#curriculum",
"requestNote": "Fragment is browser-side and is not sent in an HTTP request."
}A URL carries more than a destination. Its scheme, host, port, path, query parameters, and fragment each influence how browsers and servers behave. URL Inspector parses a complete absolute URL using the browser URL standard and exposes the parts you need to debug a redirect, link, callback, or request.
Confirm the exact origin, path, and query values returned by an identity provider.
Inspect decoded query keys and values without manually separating ampersands and percent encoding.
Compare protocol, port, and host when localhost, preview, and production links behave differently.
These examples are specific to URL parser. Replace their values with your own, then use the result as a clue—not as a substitute for application validation.
A callback works locally but fails in production.
https://app.example.com:8443/auth/callback?next=%2Faccount#complete
origin: https://app.example.com:8443 path: /auth/callback query next: /account fragment: complete
The port belongs to the origin. The fragment is not delivered to the server, so it cannot drive a server redirect decision.
A filter URL needs more than one tag.
https://example.com/search?tag=sql&tag=security&q=foreign+key
tag: sql tag: security q: foreign key
Repeated keys are valid. Your server must choose whether it expects an array, the first value, or the last value.
Use the result to make a decision in your code or content, not merely to produce another value to copy.
Include http:// or https:// so the browser can distinguish a host from a relative path.
Origin is protocol, hostname, and port together; it matters for CORS, cookies, and redirect allowlists.
Check both names and values, especially repeated, blank, or unexpectedly encoded parameters.
The part after # is normally not sent in an HTTP request. Use it for in-page state or navigation, not for server authorization, secrets, or data your backend must receive.
Do not decide whether a redirect is safe with startsWith or string concatenation. Parse the candidate URL, enforce an expected origin or relative-path policy, and reject anything outside that policy.
const candidate = new URL(next, request.url);
if (candidate.origin !== request.nextUrl.origin) {
throw new Error("Unsafe redirect");
}Each tool is deliberately narrow. These are the mistakes most likely to appear when its output is copied into a real product without checking the surrounding constraint.
Why it matters: Paths and queries change; a redirect allowlist normally needs a strict scheme, host, and port decision.
Better approach: Parse first, then compare the normalized origin against explicit allowed origins.
Why it matters: Queries can leak into history, logs, analytics, and shared links.
Better approach: Use secure authorization headers or a carefully designed short-lived callback mechanism.
These tools help with bounded client-side work. Production decisions still need the validation, review, and authorization appropriate to your application.
Without a scheme, a browser parser can interpret text as a relative path instead of a host. Add the full scheme to get a reliable result.
Origin is the scheme, hostname, and port. A URL also includes the path, query, and fragment.
No. They can appear in browser history, logs, analytics, referrer headers, and shared links. Keep secrets out of a query string.