BYTETOOLS

Postman Collection to cURL Converter

Convert an exported Postman collection into curl commands. Walks nested folders, substitutes {{variables}} and handles raw, form-data and urlencoded bodies.

What is the Postman Collection to cURL Converter?

Paste an exported Postman collection (v2. 0 or v2.

  • Recursively walks nested folders and labels each request with its folder path
  • Substitutes {{variables}} from the collection and your environment JSON
  • Handles raw, urlencoded, form-data and GraphQL request bodies
  • Skips headers and fields that are disabled in Postman
  • Correct POSIX shell quoting, including URLs containing ? and &
  • Copy commands individually or download them all as a runnable .sh file

How to use the Postman Collection to cURL Converter

  1. 1

    In Postman, open the collection menu and choose Export, then Collection v2.1.

  2. 2

    Paste the exported JSON into the collection box.

  3. 3

    Optionally paste an environment export, or a flat key/value JSON object, to resolve {{variables}}.

  4. 4

    Click Convert to cURL and choose whether to wrap long commands across lines.

  5. 5

    Copy an individual command, copy them all, or download the lot as a shell script.

About the Postman Collection to cURL Converter

Paste an exported Postman collection (v2.0 or v2.1 JSON) and this tool renders one curl command per request. It walks the nested item tree recursively, so requests inside folders and sub-folders are all found and labelled with the folder path they came from.

Collection variables are substituted automatically, and you can paste a Postman environment export — or a plain key/value JSON object — to fill in the rest. Any {{placeholder}} that is still unresolved is left visibly in place so you can spot it before running the command.

Raw, form-data, urlencoded and GraphQL bodies are all handled, disabled headers and fields are skipped, basic auth becomes -u, and every value is quoted correctly for a POSIX shell. Everything happens in your browser — the collection is never uploaded.

Frequently asked questions

How do I export a Postman collection?

Click the three dots next to the collection name in Postman, choose Export, then pick Collection v2.1 and save the JSON file. Open that file in a text editor and paste its contents here.

How are {{variables}} resolved?

Values from the collection's own variable list are applied first, then anything you paste into the environment box. Placeholders with no matching value are deliberately left as-is so they are easy to spot and fill in before you run the command.

Why are some URLs wrapped in single quotes?

Because they contain characters the shell would otherwise interpret. A ? is a glob wildcard and an & would background the command, so any URL containing them is quoted to make the command safe to paste into a terminal.

Does this include my API keys?

If they are stored in the collection or the environment JSON you paste, then yes — they will appear in the generated commands. Everything stays in your browser, but be careful where you paste the output afterwards.

What happens to file uploads in form-data?

They become -F 'field=@/path/to/file' using the path recorded in the collection. Postman stores a local path that may not exist on your machine, so check and correct it before running the command.

Is my collection uploaded anywhere?

No. The JSON is parsed entirely inside your browser tab, which matters because collections routinely contain tokens, internal hostnames and staging credentials.

Related tools