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
Walks folders recursively — every request in the collection
Variable resolved from the collection; token convertible to REDACTED.
Common errors & troubleshooting
Commands still contain {{placeholders}}. — Those variables live in a Postman environment, not the collection — environments export separately. The converter lists every unresolved name; fill them in the shell or re-export with values in collection variables.
The export will not parse. — Only Collection v2.x JSON has the item tree this converter walks. v1 exports and API-spec formats differ — in Postman choose Export → Collection v2.1, the default in current versions.
File uploads in form-data show @FILE. — The export stores no file contents, only that a file field existed. Replace @FILE with a real path (-F 'field=@./photo.jpg') before running.
A command with quotes in the body breaks in the shell. — Make sure you copied the whole multi-line command including the backslash continuations — the quoting itself is already POSIX-escaped. Toggle to single-line mode for shells that dislike continuations.
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
HAR to cURL — Turn requests from a browser HAR file into runnable cURL commands, with secrets stripped.
cURL to Fetch — Convert a curl command to a JavaScript fetch() call.
cURL to Python — Convert a curl command to Python requests code.
API Request Client — Send HTTP requests, build headers and params, inspect responses — your last 25 requests are saved locally.
URL Builder & UTM Generator — Construct and validate fully encoded production URLs with standard analytics query flags (UTM) or custom query arrays.