Postman to cURL

Turn a Postman Collection v2.1 export into runnable cURL commands — folders walked, variables resolved, auth converted, quoting handled.

Postman to cURL runs entirely in your browser. Your collections — tokens and all — are parsed on your device and never uploaded.

Open the HAR to cURL converter

About Postman to cURL

Postman to cURL converts an entire collection export into shell commands you can run, script and commit. Drop the Collection v2.1 JSON and every request — nested folders included — becomes a cURL command: collection variables like {{baseUrl}} are substituted from the export's own variable list, bearer tokens and basic-auth credentials become proper Authorization headers (base64 included), and raw JSON, urlencoded, form-data and GraphQL bodies each translate to their correct cURL flags. Quoting is the part everyone gets wrong by hand: bodies and cookies full of quotes are POSIX-escaped so the command survives a real shell. Placeholders with no value are left visibly intact and reported rather than silently emitted, and a redact switch masks Authorization, Cookie and API-key headers before a command lands in a ticket or a chat log.

Features

How to use the Postman to cURL

  1. Export from Postman: Collection → ⋯ → Export → v2.1
  2. Drop the JSON here or paste it
  3. Pick a request, or copy all commands as one script
  4. Toggle redaction before sharing anything

Example

Input

Collection with {{baseUrl}}/users and bearer auth

Output

curl 'https://api.example.com/users' \
  -H 'Authorization: Bearer tok…'

Variable resolved from the collection; token convertible to REDACTED.

Common errors & troubleshooting

Frequently asked questions

How do I export a collection from Postman for conversion?
Hover the collection, open the ⋯ menu, choose Export and keep Collection v2.1. The resulting JSON is what this converter reads — requests, folders, variables, auth and bodies all live in that one file.
Are Postman environment variables resolved?
Collection-level variables are; environment variables are a separate export that the collection file simply does not contain. Unresolved names are reported and left as visible {{placeholders}} rather than silently baked into broken URLs.
How is Postman auth converted?
Bearer auth becomes -H 'Authorization: Bearer …'; basic auth is base64-encoded into the standard header. Request-level auth wins when both exist; other schemes like OAuth flows produce no header, since they involve a runtime exchange.
Can I get every request as one script?
Yes — the copy-all output lists each command under a # comment with its folder path and name, in collection order. Paste into a .sh file and you have a smoke-test script for the whole API.
Why redact secrets before sharing a cURL command?
Commands travel — into tickets, chat, terminal history — and live tokens travel with them. The redact toggle masks Authorization, Cookie and API-key headers so the request shape is shareable while credentials stay put.

Related tools

All ArrayKit tools