Skip to content
gohacks.dev
APIs

Postman Collection to curl

Convert every request in a Postman collection to a curl command, with collection variables and your environment values filled in and inherited auth applied.

Free · No sign-up · Your inputs stay in your browser

Input

Convert a Postman collection to curl

Output

curl commands

3 requests

Folders are walked in order, and auth is inherited from the folder or collection as Postman does. Raw, URL-encoded, form-data and GraphQL bodies are converted; pre-request scripts and tests are JavaScript that runs inside Postman and are not.

Runs in this browser. Nothing you paste is sent to a server.

Why convert

curl commands go into scripts, CI jobs, runbooks and bug reports, need no Postman account to run and show exactly what is sent. Postman's own "Code" view does one request at a time; this converts the whole collection. The collection format is documented in the Postman collection schema.

What does not convert

Pre-request scripts and tests are JavaScript executed inside Postman, for example to fetch a token before each call. Their effect has to be reproduced in the shell, typically by running the login request first and exporting the token.

Share

Frequently asked questions

How do I export a Postman collection?
In Postman, open the collection's menu, choose Export and pick Collection v2.1. Environments are exported separately; enter their values in the variables box here.
Are secrets in the collection sent anywhere?
No. The conversion happens in this page. Remember that exported collections contain any tokens saved in them.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Keep planning

Similar tools