Convert a curl command to code in JavaScript (fetch), Node.js (axios), Python (requests), Go, PHP, Java, C#, Ruby or Rust. Paste a command, for example one copied with Copy as cURL from the Network tab of your browser's devtools, and get the same request in your language.


The method, URL, headers, body (-d, --data-raw, --data-urlencode, --json), multipart forms (-F), basic auth (-u), cookies (-b), -G, -I, -L and -k are translated. A JSON body becomes a native object in JavaScript and Python. Options that have no equivalent are listed under the code rather than silently dropped.


The command is parsed in your browser and never sent anywhere, which matters because copied commands often carry cookies and tokens. To test a request against an endpoint you control, try the Webhook Tester .

Frequently asked questions

How do I get a curl command for a request my browser makes?

Open the devtools Network tab, right-click the request and choose Copy, then Copy as cURL (bash on Windows too). Paste it here and pick a language.

Which curl options are supported?

The method (-X), headers (-H), bodies (-d, --data-raw, --data-binary, --data-urlencode, --json), multipart forms (-F), basic auth (-u), cookies (-b), user agent (-A), -G, -I, -L, -k and --compressed. Anything else is listed under the code as not translated.

Is it safe to paste a command with my token or cookies?

The command is parsed in your browser and never sent to a server, and the page has no share link for it. Still, replace live tokens before pasting the generated code anywhere public.

Why does the Java code not include my -F form fields?

java.net.http has no built-in multipart/form-data support, so the converter notes it instead of writing a long hand-made encoder. Use a library such as Apache HttpClient for multipart uploads in Java.

Related tools