Postman Collection Builder

Generate a Postman collection JSON for testing a REST API

Takes an API base URL, an auth type, and a list of endpoints with methods and sample bodies, then outputs a valid Postman Collection v2.1 JSON you can import straight into Postman. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What is Postman Collection v2.1?

It is the current JSON format Postman uses to store a group of saved requests. The schema lives at the v2.1 URL and is recognized by the Import dialog in any modern Postman version.

Build a Postman collection in seconds

A Postman collection is just a JSON document describing a set of saved HTTP requests. Writing one by hand is error-prone because the v2.1 schema nests request, url, header, and body objects in a specific shape. This builder takes a base URL, an auth choice, and a plain list of endpoints, and emits a clean, importable collection.

How it works

The output follows the Postman Collection v2.1 schema. The collection has an info block with a generated UUID and the schema URL, a variable array holding your baseUrl, and an item array with one entry per endpoint. Each line you enter is parsed as METHOD path; the path is appended to the {{baseUrl}} variable and split into host and path segments as the schema requires. When the next line is a JSON object, it is attached as a raw body with a application/json Content-Type header. Selecting Bearer or Basic adds a collection-level auth block so every request inherits credentials.

Input format

Enter endpoints one per line as METHOD /path. Optionally add a JSON body on the next line for POST, PUT, and PATCH requests:

GET /users
GET /users/:id
POST /users
{"name":"Ada","email":"[email protected]"}
PUT /users/:id
{"name":"Ada Lovelace"}
DELETE /users/:id

Methods are case-insensitive. Path parameters like :id are treated as literal text — Postman recognises the colon prefix and turns them into editable path variables in the UI automatically.

Auth options

None — no auth headers are added; useful for open endpoints or when auth is handled per-request.

Bearer — adds a collection-level auth block of type bearer with a token variable. Postman sends Authorization: Bearer {{token}} with every request. After importing, set the token variable in the Postman collection editor or environment.

Basic — adds a basic auth block using username and password variables. Postman encodes the credentials as a Base64 Authorization: Basic header on each request.

After importing

Once the JSON file is imported:

  1. Open Edit CollectionVariables to set your baseUrl, token, or other values.
  2. For parameterised paths like /users/:id, Postman will have created path variable placeholders — click the request and set them under Path Variables.
  3. Use Environments to maintain separate baseUrl values for development, staging, and production without editing the collection itself.

Tips and example

List endpoints one per line, for example GET /users then POST /users followed by {"name":"Ada"} on its own line. Methods are case-insensitive. After importing, set the token variable in the collection to authenticate live calls. Share the saved .json file in your repository alongside the API code so team members can import it without reconstructing it manually.