Loading tool…
Paste a cURL command and instantly get equivalent code in Python (requests), browser JavaScript (fetch) or Node.js. Great for turning API docs and DevTools "Copy as cURL" into working code.
Loading tool…
cURL Converter is a free, private online tool that lets you convert a cURL command into ready-to-run Python (requests), JavaScript (fetch) or Node.js code. It runs entirely in your browser, so nothing you enter is uploaded to a server.
curl command (for example from your browser's Copy as cURL) into the Input box.Privacy: this tool runs entirely in your browser. Your input is never sent to, received by, or stored on any server — there are no uploads and no tracking of what you enter.
The converter parses the URL, method, headers and body from your cURL command and rebuilds them as an HTTP request in your chosen language — no more hand-translating flags.
Common options are understood: -X/--request, -H/--header, -d/--data, -u/--user (basic auth), -A (user agent) and -b (cookies).
In Chrome or Firefox DevTools, right-click any network request and choose "Copy as cURL", then paste it here to reproduce the call in your code.
-d body is carried through as the request body; set a Content-Type header for JSON APIs.-u user:pass becomes an Authorization: Basic header.cURL is the universal command-line tool for making HTTP requests, and browser dev tools can export any network request as a curl command. This converter takes that command and rewrites it as ready-to-run code in Python (requests), browser JavaScript (fetch) or Node.js — turning a quick test on the command line into working application code in seconds.
The tool tokenises the cURL command, respecting quotes, and extracts the pieces that define the request: the URL, the HTTP method (-X), each header (-H), the request body (-d/--data), basic auth (-u), the user agent (-A) and cookies (-b). It then reconstructs an equivalent request using each target language's idiomatic HTTP library.
The biggest time-saver is pairing this with your browser. In Chrome or Firefox dev tools, open the Network tab, right-click any request and choose Copy → Copy as cURL. Paste it here and you instantly get the same call as Python or JavaScript — headers, auth, body and all — which you can drop straight into a script or app. No more hand-translating flags.
If you do not specify a method, cURL (and this converter) sends GET unless there is a body, in which case it becomes POST — matching cURL's own behaviour. A -d body is carried through as the request body; for JSON APIs, include a Content-Type: application/json header so the receiving server parses it correctly. Basic-auth credentials from -u user:pass are turned into an Authorization: Basic header.
The converter handles the common flags you meet day to day; very exotic cURL options are ignored rather than mistranslated. Everything — parsing and code generation — runs in your browser, so commands that include API keys, tokens or cookies are processed locally and never sent anywhere.