Curl Converter
Convert curl commands into ready-to-run Python, JavaScript fetch, Node axios, PHP and Go code — locally in your browser.
Result
Every API documentation on the planet shows examples as curl commands, and every browser exports captured traffic as Copy as cURL — but your project is written in Python, JavaScript, PHP or Go. This converter does the boring translation: paste the curl command, pick a target language and get working code with the method, URL, headers, body, authentication and form fields all carried over.
The converter actually parses the command the way a shell would: single and double quotes, escaped characters and multi-line commands with trailing backslashes are tokenized correctly, and then curl's flags are interpreted — -X/--request, -H/--header, -d/--data/--data-raw, -u/--user, -F/--form, --json and combined forms like -XPOST. From that request model it generates idiomatic code for five targets: Python requests, browser/Node fetch, Node.js axios, PHP cURL and Go net/http.
Details matter in generated code. A JSON body is detected via Content-Type or --json and rendered as a native dict or object literal — so you can edit fields naturally instead of fighting escaped quotes. Basic auth becomes requests' auth tuple, an Authorization header with btoa() in fetch, axios' auth option, CURLOPT_USERPWD in PHP or SetBasicAuth in Go. File uploads (-F name=@file) generate real multipart code, including Go's mime/multipart writer boilerplate that nobody remembers by heart.
The output is syntax-highlighted, copyable in one click and downloadable under the right file name. And because curl commands copied from DevTools regularly contain session cookies and API keys, the whole conversion runs client-side in your browser — nothing is transmitted, and the page works offline once loaded.