From curl to working code in seconds
curl is the universal language of HTTP examples: API documentation, Postman, Insomnia and the “Copy as cURL” option in your browser's DevTools all produce curl commands. Turning one into application code by hand means translating every header, body and flag – and it is easy to get subtly wrong. This converter parses the command exactly like a shell would and generates idiomatic code for Python (requests), JavaScript (fetch), Node.js (axios), Go (net/http) and PHP (cURL).
What is supported
- Methods (
-X), headers (-H), user agent, referer and bearer tokens. - Bodies with
-d,--data-raw,--data-binary,--data-urlencodeand--json. JSON bodies become native objects; form bodies become dictionaries. - Multipart uploads with
-F, including files (-F file=@photo.jpg). - Basic auth (
-u), cookies (-b),-Gquery strings,-I,-Lredirects,-k, timeouts and grouped flags such as-sSL. - Multi-line commands with bash
\, Windows^or PowerShell`continuations, and$'…'quoting.
The generated code mirrors curl's behaviour: for example, redirects are only followed when the command uses
-L, and -d sends application/x-www-form-urlencoded unless you set another content
type. Options without an equivalent are listed under Notes instead of being silently dropped.
Private by design
curl commands copied from DevTools often contain session cookies and API keys. The conversion runs entirely in your
browser, so nothing is sent to our servers. The last command is kept in localStorage for convenience; use
Clear Data to remove it.
Practical example
In Chrome or Firefox, open DevTools, go to the Network tab, right-click a request and choose
Copy → Copy as cURL (bash). Paste it here, pick your language and you have a reproducible request for a test,
a script or a bug report. Remember to remove headers you do not need – browsers add many, such as
sec-ch-ua or accept-language.