Skip to content

Menu

Postman to Curl

Convert Postman requests to curl

Runs entirely in your browserAPI & HTTPFree, no sign-up
Loading tool

01What is Postman to Curl?

Postman can export requests, but sometimes you just want the curl command for a README, a bug report or a shell script. Paste Postman JSON here and click Convert. It understands the Postman Collection v2.0 and v2.1 formats in four shapes: a bare request object with method and url, a request given as just a URL string, a collection item that wraps a request, or a whole collection, in which case the first request is used, searching inside folders if the collection starts with one. The URL comes from url.raw when present; otherwise it's assembled from protocol, host, path and the enabled query parameters. Bearer, basic and API-key auth become an Authorization header, a --user flag, or a header or query parameter, and both the v2.0 and v2.1 ways of storing auth values are read. Enabled headers become --header flags and disabled ones are skipped. Raw bodies go out as --data-raw and urlencoded bodies are encoded into a single --data-raw string. Formdata text fields become --form-string and file fields become --form key=@path. The difference matters: with plain --data or --form, curl treats a value starting with @ or < as a file to read, so a body like @admin would silently upload a local file instead. File bodies use --data-binary, and GraphQL bodies are sent as the JSON {query, variables} that GraphQL servers expect. The method flag is chosen carefully: HEAD uses --head, because --request HEAD makes curl wait for a body that never comes, and a GET that carries a body keeps an explicit --request GET, since curl would otherwise switch to POST. Every value is wrapped in single quotes with embedded quotes escaped the POSIX way, so the output is for bash, zsh and other POSIX shells. The Multi-line format breaks the command across lines with backslashes; Single-line keeps it on one. Conversion happens in your browser.

API developers, QA engineers, technical writers and support engineers sharing reproducible requests. The tool runs entirely in your browser, so your data never leaves your device.

02How to use Postman to Curl

  1. In Postman, export the collection or copy the request JSON.
  2. Paste it into Postman Request JSON.
  3. Choose Multi-line or Single-line.
  4. Click Convert and read the cURL Command; fix any error message shown.
  5. Click Copy, or Reset to start again.

03Worked examples

Input: {"method":"POST","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\"name\":\"Ada\"}"},"url":{"raw":"https://api.example.com/users"}}
Result: curl --url 'https://api.example.com/users' --header 'Content-Type: application/json' --data-raw '{"name":"Ada"}'
No --request POST is written because curl already sends POST when --data-raw is present.
Input: {"method":"DELETE","url":"https://api.example.com/items/42"} inside a collection folder
Result: curl --request DELETE --url 'https://api.example.com/items/42'
When given a whole collection, the tool converts the first request it finds, including one nested inside a folder.
Input: {"method":"GET","auth":{"type":"bearer","bearer":[{"key":"token","value":"{{token}}"}]},"url":{"raw":"{{baseUrl}}/me?x=1"}}
Result: curl --url '{{baseUrl}}/me?x=1' --header 'Authorization: Bearer {{token}}'
Postman {{variables}} are left as they are, so replace them before running the command.
Input: {"method":"GET","auth":{"type":"basic","basic":[{"key":"username","value":"u"},{"key":"password","value":"p"}]},"url":"https://x.test/a"}
Result: curl --user 'u:p' --url 'https://x.test/a'
Input: {"method":"POST","body":{"mode":"raw","raw":"it's"},"url":"https://x.test/a"}
Result: curl --url 'https://x.test/a' --data-raw 'it'\''s'
A single quote inside a single-quoted shell string is written as '\'' (close the quote, add an escaped quote, reopen).

04Common use cases

  • Pasting a reproducible API call into a GitHub issue or Jira ticket
  • Moving a request from a Postman collection into a bash deployment or smoke-test script
  • Sharing an API example with a teammate who doesn't use Postman
  • Writing curl examples for API documentation or a README
  • Running a request on a remote server over SSH where only curl is available

05Tips

  • Postman variables like {{baseUrl}} or {{token}} are copied literally, so replace them or export shell variables with the same names before running.
  • Only the first request of a collection is converted; paste the single item you need if it is further down.
  • Collection-level and folder-level auth are not inherited, so a request set to inherit auth comes out without it.
  • The single-quoted output is for POSIX shells; Windows cmd and PowerShell quote differently, so run it in Git Bash or WSL there.

06Related concepts

curl, Postman collections, HTTP requests, Shell quoting, REST API testing.

Frequently Asked Questions

What is Postman to Curl?

Postman to Curl is a free, browser-based developer tool on AIDToolStack. Convert Postman requests to curl It requires no installation or sign-up and works entirely in your browser.

Is Postman to Curl free to use?

Yes. No sign-up, no fees and no usage cap.

Does Postman to Curl store my data?

No. It runs in your browser; nothing is uploaded.

Cheat sheet

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…

What changed in AI dev tools, once a month

Renames, shutdowns, pricing changes and new MCP setups, each with a source.

Subscribe