URL Builder

Build a complete URL from a base URL plus path and query parameters written as JSON.

Report a problem

Input

An absolute URL such as https://…. Mark path parameters as {name} or :name. Query parameters and the #fragment already in the URL are kept.

Each key fills the placeholder with the same name. Use a string, number or boolean value.

Each key becomes a query parameter. A parameter with the same name in the base URL is replaced.

The URL is assembled in this browser. This tool does not open or request it.

Query format

null values and empty arrays or objects are omitted. Arrays that contain objects or arrays always use index notation. Brackets in keys are encoded as %5B and %5D, and numbers are kept exactly as written.

Complete URL

Enter a base URL to build the complete URL.

About URL Builder

Combine a base URL with path and query parameters written as JSON.

Mark path placeholders as {name} or :name in the base URL, put their values in the path JSON and put query parameters in the query JSON. Choose how arrays, nested objects and spaces are written.

Copy the complete URL for an API request, test link or documentation example. The parameter table shows each decoded key and value for review.

The calculation or rendering runs in this browser tab. Copy, download and share actions make the chosen output available outside this tab.

Worked example

Input / settings
https://api.example.com/users/{userId}/posts?sort=desc; path {"userId": 42}; query {"page": 2, "tags": ["a", "b"]}
Action
Build with the default Repeat array format
Result
https://api.example.com/users/42/posts?sort=desc&page=2&tags=a&tags=b

Scope and limits

  • The base URL must be absolute with a scheme such as https://. Path values must be non-empty strings, numbers or booleans and are encoded as one path segment, so a slash becomes %2F.
  • null values and empty arrays or objects are omitted, and an empty string produces key=. A JSON key replaces the same key already in the base URL, and numbers keep their original text, including large integers.
  • The result is normalized by the browser URL parser; for example, an internationalized domain becomes Punycode and a default port is removed.

Frequently asked questions

Which array format should I choose?
Use the format your server parses. Repeat works with many frameworks such as Spring and FastAPI, brackets work with PHP, Rails and qs-based parsers, indices work with PHP and qs, and comma suits APIs that split a single value.

For account, sync, advertising and analytics data flows, see the Privacy Policy.