cURL to code converter
Paste a curl command — the one you copied from DevTools or from an API’s documentation — and get equivalent code in Python, Node, Go or PHP. Headers, JSON bodies, basic auth and cookies are carried over. The parsing happens in your browser, so nothing you paste is sent anywhere.
Where the curl command comes from
The fastest way to reproduce a request you can see in a browser is to let the browser write it for you. Open DevTools, go to the Network tab, right-click the request and choose Copy → Copy as cURL. You get the full request with every header and cookie the browser sent. Paste it above and you have the same request as code.
That workflow is also the honest way to find an API. A page that renders its content from JSON is usually easier and far cheaper to read through its own endpoint than by parsing the rendered HTML.
Which flags are carried over
| Flag | Becomes |
|---|---|
-X, --request | The HTTP method |
-H, --header | An entry in the headers map |
-d, --data, --data-raw, --json | The request body; valid JSON is detected and passed as a native object |
-u, --user | Basic authentication |
-b, --cookie | The Cookie header |
-A, -e | User-Agent and Referer headers |
-x, --proxy | Proxy configuration, where the client supports it |
-L, -k | Redirect following and TLS verification |
Flags that only affect curl’s own output — -s, -v, -i, --compressed — are recognised and dropped, because they have no equivalent in the generated code.
Why the generated code often fails on real sites
A converted request reproduces the headers, not the client. Many sites decide what to serve based on things a converter cannot copy: the TLS fingerprint, the exact order of your HTTP/2 headers, and whether your IP looks like a data centre. That is why a curl command that works from your laptop can return a challenge page from a server, with identical headers.
If that is the wall you have hit, it is the problem our scraping API exists to solve: a real browser fingerprint, residential exits and a retry path, with the page coming back as Markdown or JSON.
Questions about converting curl
How do I convert a curl command to Python requests?
json= so requests sets the content type itself, and form data is passed with data=.How do I get a curl command from my browser?
Does the converter send my command to a server?
Why does the converted code get blocked when curl worked?
Which languages are supported?
Can it handle multipart file uploads?
-F are parsed, but file uploads need a real file on disk, so the generated code marks where to attach it rather than pretending to inline the content.The request works. Now make it work at scale.
One envelope for every endpoint, clean Markdown out, and you are billed only when a call returns a usable result.
Get my free API keyFree key, $2 of usage credit every month, no credit card.