Convert curl commands into Python, JavaScript, Node.js, PHP, Go, Java, Ruby, or C# code. Paste a command — headers, cookies, auth, and body included — and copy working code. Runs in your browser, no signup.
Conversion runs entirely in your browser — the command (and any tokens or cookies in it) is never sent to a server. Tip: DevTools Network tab → right-click a request → Copy as cURL.
Hand-copied curl headers go stale, and sites still block datacenter IPs. The same request through
the WebScraping.AI API gets rotating proxies, headless Chrome rendering, and unblocking in one
call — your custom headers and cookies are forwarded via the headers parameter:
The API fetches and renders pages (GET). To extract data instead of raw HTML, use /selected with a CSS selector or /ai/fields for LLM-powered field extraction.
2,000 free API credits · No credit card required
Each converter page preselects its language and covers the idioms of that HTTP client:
Ruby (Net::HTTP) and C# (HttpClient) are in the language dropdown above.
The converter understands the options that appear in real scraping and API work — including everything Chrome DevTools emits with "Copy as cURL". Unrecognized flags are listed as warnings instead of silently dropped. For what each option does on the command line, see the curl commands guide.
| Option | Meaning |
|---|---|
-X, --request | HTTP method (also the attached form, -XPOST) |
-H, --header | Request headers; a Cookie: header is treated as cookies |
-d, --data, --data-raw, --data-binary | Request body; repeated values are joined with & |
--data-urlencode | Body value with URL encoding applied |
--json | JSON body with Content-Type/Accept set (curl 7.82+) |
-F, --form | multipart/form-data fields, including @file uploads |
-u, --user | Basic auth credentials |
-b, --cookie | Cookies as name=value pairs |
-A, --user-agent / -e, --referer | Shorthands converted to their headers |
-x, --proxy | Proxy server |
-L, -k, -I, -G, -m | Redirects, TLS verification, HEAD, data-as-query, timeout |
--compressed, -s, -v, -o, … | Transfer/output flags most HTTP libraries handle automatically |
The fastest way to reproduce a browser request in code: open DevTools → Network, right-click the request, and pick Copy as cURL. Paste it here and you get the same request as idiomatic code — quoting handled, headers preserved, the body parsed into the shape your HTTP library expects (a JSON object, form params, or a raw string).
One honest caveat from the scraping trenches: copied curl commands carry session cookies and browser-fingerprint headers that expire or get flagged, so a request that works today often returns 403 next week. That isn't a code problem — it's an IP-reputation and fingerprinting problem, which is what the WebScraping.AI API solves with rotating proxies and real headless Chrome.
How do I convert a curl command to code?
Paste the command into the converter and pick a language — Python, JavaScript, Node.js, PHP, Go, Java, Ruby, or C#. The code updates as you type. Headers, cookies, basic auth, JSON or form bodies, file uploads, proxies, and timeouts are all translated.
Is it safe to paste curl commands with cookies or API keys?
Yes — parsing and code generation run entirely in your browser with JavaScript. The command is never transmitted or logged. You can verify in the DevTools Network tab: typing in the converter produces no network requests.
How do I copy a request as curl from Chrome DevTools?
Open DevTools, go to the Network tab, reload the page, right-click the request you want, then Copy → Copy as cURL. Paste the result here. Use the bash variant on Windows if offered — the cmd variant's caret escaping is only partially supported.
Why does the converted request get a 403 when the browser doesn't?
The site is blocking on more than headers: TLS fingerprint, IP reputation, JavaScript challenges, or expired session cookies. Copying more headers rarely fixes it for long. Routing the request through a scraping API with rotating proxies and headless Chrome — like WebScraping.AI — solves it at the infrastructure level.
Which curl options does the converter support?
The common request options: -X, -H, -d and the --data variants, --json, -F file uploads, -u basic auth, -b cookies, -A, -e, -x proxies, -L, -k, -I, -G, and -m. Unsupported flags are reported as warnings rather than silently ignored.
Is this curl converter free?
Yes — free, no signup, no usage limits. It's a static, client-side tool.
Run the same request with rotating proxies, headless Chrome, and JS rendering — one API call.