About this cURL converter
Browsers, API docs, and Postman all export requests as curl commands, but your project needs them in its own language. This converter reads the command the way a shell does, honoring single and double quotes, $'…' strings, and backslash line continuations from macOS, Linux, Windows CMD, and PowerShell, then understands the options that matter: -X, -H, -d and its variants, --json, -F multipart forms with file uploads, -u basic auth, -b cookies, -A and -e, -G, -L redirects, -k, --compressed, and timeouts. You get a structured JSON description of the request or idiomatic code for Python requests, fetch, axios, PHP cURL, or Go. Nothing is sent anywhere, so tokens in your command stay private.
How to convert a cURL command
- Copy the command. In your browser’s developer tools, right-click a request in the Network tab and choose Copy as cURL, or take one from API docs.
- Paste and pick a format. Paste it here and choose JSON, Python, fetch, axios, PHP, or Go.
- Press Convert cURL. Copy the code, or switch formats with the buttons above the result.
Frequently asked questions
Which curl options are supported?
Method, headers, all data options, --json, multipart forms, basic auth, cookies, user agent, referer, -G, -L, -k, --compressed, --max-time, and --connect-timeout. Others are listed in a note so you know they were skipped.
Is my token or password sent anywhere?
No. Parsing and code generation run entirely in your browser, so headers, cookies, and passwords never leave your device.
Why did my request become a POST?
curl sends POST whenever you pass data with -d, --json, or -F, unless -X sets another method or -G moves the data into the query string. The converter follows the same rules.
Does it handle commands copied on Windows?
Yes. Line continuations with ^ (CMD) and ` (PowerShell) are joined like backslashes, and double-quoted strings with escaped quotes are understood.
How are file uploads converted?
Form fields like -F [email protected] become a files entry in Python, a CURLFile in PHP, and a FormData placeholder in JavaScript where you attach the real file.