Skip to content
rusthacks.dev
Web

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.

Go deeper

Suggested reading

Flat illustration for the post “Axum Integration Tests With a Real Database in Docker”, composed around web.
WebGuide

Axum Integration Tests With a Real Database in Docker

Test an Axum API against a real Postgres started by Testcontainers: one container per test binary, one migrated database per test, the leaks and version traps that bite, and measured timings for each isolation strategy.

18 min read
Flat illustration for the post “Stale While Revalidate Caching in Rust Services Explained”, composed around perf.
Performance

Stale While Revalidate Caching in Rust Services Explained

Serve the cached value immediately, even if slightly old, and refresh it in the background. Learn the idea, the HTTP Cache-Control directives and an in-process implementation with a freshness window and a grace window.

4 min read

Keep planning

Similar tools