Postman Collection Converter
Turn a Postman collection into ready-to-run cURL commands, with variables filled in, or into a starting OpenAPI 3 spec in YAML or JSON.
How to convert a Postman collection
Export the collection
In Postman, use Export and pick Collection v2.1, then paste the JSON here.
Choose the output
cURL commands or a starting OpenAPI 3 spec in YAML or JSON.
Copy or download the result
Copy the result with one click. Many tools also offer a download.
Worked example
This is what Postman Collection Converter gives for its own sample values. Open the tool above and change anything to try your own.
Postman collection (v2.0 or v2.1 JSON)
{
"info": {
"name": "Shop API",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"variable": [
{
"key": "baseUrl",
"value": "https://api.shop.example"
}
],
"auth": {
"type": "bearer",
"bearer": [
...- Convert to
- cURL commands
- Fill in collection variables
- Yes
cURL commands
# Users / Get user
curl 'https://api.shop.example/users/:id?expand=orders' \
-H 'Authorization: Bearer {{token}}'
# Create order
curl 'https://api.shop.example/orders' \
-H 'Idempotency-Key: {{$guid}}' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {{token}}' \
--data-raw '{
"sku": "A-100",
"quantity": 2
}'When to use Postman Collection Converter
A teammate shared a Postman collection and you want to run the requests from a script or CI without Postman.
The API was explored in Postman first and now needs an OpenAPI spec for docs and code generation.
Tips for a better Postman Collection Converter result
Add environment values such as baseUrl and token in the variables box, so the cURL commands run as they are.
Treat the OpenAPI output as a draft: add response schemas, descriptions and error codes before publishing it.
Postman Collection Converter: limits and what to check
Dynamic variables such as {{$guid}} and {{$timestamp}} are Postman features, so they stay as written in the cURL commands.
File fields in form-data bodies refer to paths on the machine that made the collection, so fix them before running the commands.
About Postman Collection Converter
Move requests out of Postman. cURL commands carry the method, headers, body and the auth set on the collection or folder, with collection variables filled in. The OpenAPI output turns each request into an operation, with :id and {{variable}} path parts as path parameters and request schemas guessed from JSON bodies.
FAQs
What about environment variables?
Environments are exported separately in Postman. Type their values in the extra variables box as name=value lines.
Are tests and pre-request scripts converted?
No. Scripts are JavaScript that only Postman runs, so they are skipped.
Is the OpenAPI output complete?
It is a starting point. Collections do not describe responses, so each operation gets a plain 200 response for you to fill in.