cURL to Code Converter

Convert curl commands into JavaScript, Python, Go, PHP or Rust code.

Runs in your browser — your data never leaves your device

Frequently Asked Questions

How do I convert a curl command to code?

Paste the curl command into the input box and pick a language tab. The equivalent request code appears instantly and can be copied with one click.

How do I get a curl command from my browser?

Open developer tools, go to the Network tab, right-click a request and choose Copy → Copy as cURL. Paste it here to turn it into code.

Which languages are supported?

JavaScript (fetch), Node.js (axios), Python (requests), Go (net/http), PHP (cURL) and Rust (reqwest).

Which curl options are supported?

Methods, headers, cookies, user agent, request bodies (-d, --data-raw, --data-urlencode, --json), multipart forms and file uploads (-F), basic auth (-u), -G query strings, -I, -k and -L. Options that cannot be translated are listed as warnings.

Is it safe to paste commands that contain API keys?

Yes. The conversion runs entirely in your browser, so tokens, cookies and passwords in the command are never sent anywhere.