About this tool
Join a base URL with path segments the safe way, and see how it differs from RFC 3986 reference resolution with slashes, dot segments and query strings.
This joiner takes a base URL and a list of path segments and produces two answers: the safe concatenation, which always preserves the base path, and the RFC 3986 section 5 reference resolution that fetch and the WHATWG URL parser actually perform. Where the two disagree it names the rule responsible — a path-absolute reference replacing the base path, a missing trailing slash dropping the last base segment, or the base query string being discarded. Dot segments are removed with the algorithm in section 5.2.4.
Open Base URL Path Joiner on AltFTool — it loads instantly in your browser.
Paste your code or data sample into the workspace.
Pick the format, conversion, or analysis you need.
Copy the polished result straight back into your project.
See the naive join and the spec resolution together instead of discovering the gap in production.
Every difference is explained by the specific RFC 3986 clause that caused it.
Merges query strings from the base and the segments and warns when two fragments collide.
Because a reference starting with "/" is path-absolute. RFC 3986 section 5.2.2 replaces the entire base path with it and keeps only the scheme and authority, so https://example.com/v1/ plus /api/v2 gives https://example.com/api/v2. Drop the leading slash to get relative merging instead.
Yes, and it changes the result. RFC 3986 section 5.3 merges a relative reference by removing everything after the last "/" in the base path. So base .../v1 plus "users" resolves to .../users, while base .../v1/ plus "users" resolves to .../v1/users. Always give an API base URL a trailing slash.
Strip trailing slashes from the base path and leading slashes from each segment, join them with a single "/", then run the RFC 3986 remove-dot-segments algorithm on the result. That keeps the full base path, which is what most people want, but it is not what new URL() does — so do not assume the two agree.
Reference resolution throws it away. RFC 3986 section 5.3 keeps the base query only when the reference is entirely empty; any relative path at all replaces the query with the reference's own, which is usually nothing. If you need base parameters preserved, merge them yourself after resolving.