Convert any cURL command to Python, JavaScript, Go, PHP, Rust, or Ruby. Instant, free, runs entirely in your browser.
// Output will appear here after conversion
Uses the requests library. Clean, idiomatic code with proper session handling.
Native fetch() API. Works in browsers and Node.js 18+. No dependencies.
Standard net/http package. Proper error handling and response body reading.
Native curl_* functions. Sets all options correctly including SSL and redirects.
Uses reqwest crate with async/await. Includes proper error handling with ? operator.
Uses net/http from stdlib. Handles URI parsing, headers, and request bodies.
| Flag | Description | Example |
|---|---|---|
| -X, --request | HTTP method | -X POST |
| -H, --header | Custom header | -H "Content-Type: application/json" |
| -d, --data | POST data body | -d '{"key":"value"}' |
| --data-raw | POST data (no @ processing) | --data-raw '{"key":"val"}' |
| --data-binary | Binary POST data | --data-binary @file.bin |
| -u, --user | Basic auth credentials | -u user:pass |
| -b, --cookie | Send cookies | -b "session=abc123" |
| -A, --user-agent | User-Agent header | -A "MyApp/1.0" |
| -F, --form | Multipart form data | -F "file=@photo.jpg" |
| -k, --insecure | Skip SSL verification | -k |
| -L, --location | Follow redirects | -L |
| --compressed | Accept compressed response | --compressed |
| -e, --referer | Referer header | -e "https://google.com" |
| --connect-timeout | Connection timeout (seconds) | --connect-timeout 10 |
| -m, --max-time | Max request time (seconds) | -m 30 |
Try the Agent Gateway — 13+ API endpoints including DNS, screenshots, IP geolocation, crypto prices, and more. One API key, unlimited tools.
Get Free API Key