tools/data/curl converter
// datanew

curl converter

convert curl to fetch, axios, python requests

drag & drop · up to 5 MB (Pro: 100 MB)
— paste a curl command // client-only
// converted output appears here

              curl -sX POST 'https://api.whittly.dev/v1/curl/convert' \
  -H 'Authorization: Bearer $WHITTLY_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"curl":"curl -X POST https://api.example.com -H 'Content-Type: application/json' -d '{}'","target":"fetch"}'
            

              const res = await fetch('https://api.whittly.dev/v1/curl/convert', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + apiKey,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({ curl: "curl -X POST ...", target: "fetch" }),
});
const data = await res.json();
            

              const { data } = await axios.post(
  'https://api.whittly.dev/v1/curl/convert',
  { curl: "curl -X POST ...", target: "fetch" },
  { headers: { Authorization: 'Bearer ' + apiKey } }
);
            
// probulk conversionpro·HAR importproupgrade →

// about this tool

curl is the universal command-line HTTP client — developers use it to test APIs, share reproducible requests, and document API calls. This tool parses any curl command and converts it to the equivalent code in JavaScript fetch, Axios, Python requests, or HTTPie.

// when to use

  • Copy a curl command from API docs and convert it to your language
  • Share an API request with a teammate in their preferred language
  • Convert browser DevTools "Copy as cURL" output to fetch
  • Understand what headers and auth a curl command is sending

// faq

What curl flags are supported?
-X (method), -H (headers), -d / --data / --data-raw / --data-binary (body), -u (basic auth), -b (cookies), --url, -F (form data), --json, and all common no-value flags like -L, -s, -k.
Are multi-line curl commands supported?
Yes. Curl commands split across lines with backslash continuation (\) are joined before parsing.
// history
Pro Cloud Sync — upgrade
no operations yet