cURL to code
Paste a cURL command and get the code in fetch, axios, Python, Go or PHP. In the browser: tokens and keys are never sent.
Genuinely free. No sign-up, no email, no limits, no cookies. We don't store the URL you analyse.
Paste a cURL command to get the equivalent code.
What this tool cannot see
It covers curl's everyday flags, not every option. The generated code is a correct starting point to review for edge cases (file uploads, multipart forms). Everything runs in your browser.
What it's for
APIs are almost always documented with cURL examples, but your code is in another language. Rewriting a command with headers, body and auth by hand is tedious and error-prone: this tool does the translation instantly, preserving method, headers, data and credentials. And since those commands often contain secrets, doing it in the browser, without sending them anywhere, isn't a detail.
With the other developer tools: the JWT decoder, the code formatter and the URL encode/decode.
Frequently asked questions
›Which languages does it convert to?
JavaScript (fetch and axios), Python (requests), Go (net/http) and PHP (curl). Paste the command once and switch between languages with a click.
›Is my curl command sent to a server?
No, and here it matters more than usual: a cURL command often contains auth tokens, API keys or credentials. Conversion happens entirely in your browser: the command never leaves your device and isn't stored, unlike converters that send it to a server.
›Which curl options does it support?
The most used: method (-X/--request), headers (-H), data (-d, --data, --data-raw and variants), basic auth (-u), cookies (-b). Purely behavioural flags (like -L, --compressed, -s) are ignored because they don't affect the generated code. It doesn't aim to cover every single curl flag.
›How does it know if it's a GET or POST request?
If you set the method with -X it respects it. Otherwise it infers: with data (-d) it assumes POST, otherwise GET, the same rule curl applies.